I have a workflow step that sends an email.

Of course, I want to address the email recipient by name. However, in my app, I have 2 possible names - when a user is created they put in their Legal name, but then also have the option to add a Preferred name.

I’d like a way to write a dynamic expression in the Body field that directly evaluates to the appropriate name, so something like (Current User’s Preferred name OR Current User’s Legal name). Is this possible?

The reason I don’t really want to do this as a conditional (where I make this a workflow step that fires ONLY when the Current User’s Preferred name is not empty, and then duplicate this workflow step into another one that fires ONLY when the Current User’s Preferred name is empty [the latter of which will use the Legal name in the Body]) is because that’s not sustainable for the number of permutations in which I need to do this exact same kind of logic in the Body (for example, I also need to vary the name of the Sender, and it’s just too much).

Thanks

Write a expression like this Current User's Preferred Name is not empty : formatted as text

So you will see a new section to insert what you want if the expression is evaluated to yes or no.

So there, for yes you can use Current User's Preferred Name and for no Current User's Legal Name.

1 Like

Another method I picked up from @georgecollier is to use the defaulting to operator….so can be users preferred name defaulting to users legal name

I believe you can continue the use of defaulting to and eventually just have it default to text like ‘no name set’

1 Like

can you give me an example?

that is the example from before, it is the dynamic expression, except user is current user

oh WOW - that is SO readable i just had no idea “defaulting to” was an operator! thank you!

This topic was automatically closed after 70 days. New replies are no longer allowed.