I am concatenating three custom fields in my issue automation (firstname first letter, middle initial, lastname) to create an email address to include in a sub-task as part of a new user profile.
Email Address: {{issue.customfield_11884.left(1)}}{{issue.customfield_12034}}{{issue.customField_11885}}@myorg.org
It works fine unless the new user doesn't have a middle initial OR the reporter has entered something like NA in the form. Then I don't want the middle initial to show up and then simply first initial and last name would form the email address.
I've used Smart Values (that's how I get the first initial) but I don't know how to process the logic. I wasn't successful using if then statements and then setting a variable in the automation -maybe a syntax error.
I've also searched for a way to create logic/variables in the automation, but haven't got that working either.
Thanks for any help!