Are there any inline functions to conditionally hide or manipulate strings? e.g. I have a form with optional fields and send a notification email to someone when the form is submitted. If the user does not populate these fields, I don't want to show the labels and the empty fields in the email. e.g. the mobile phone is optional.
An inline function along the lines of if(isblank(mobilePhone),"","Mobile: "&mobilePhone) would be awesome.
I think I can do this using the build string action but I'm wondering if I can do this directly in actions such as the send notification action.
Solved! Go to Solution.
I also am looking for the equivalent of an if statement within Nintex. I have a check box which I want to use to return one of two possible text strings to use in an email notification.
how do You send this notification when the form is submitted? Are You using the 'Send Notification' action?
Then you can build your message using 'Build String' actions depending on 'Set a Condition' actions.
There is a Run If action in Nintex....that is where you can do your build string as Andrew recommended. There are also regular expression actions. You can manipulate strings with that too!
Yes - I understand that we can build conditional strings as part of the workflow actions. My question is different as it relates to building these strings at run-time. e.g. while the form is being displayed or even the text that is sent to a person via the email or flexi task actions.
What you're suggesting in the case of dynamic text for actions is to build the components of the email message using separate actions storing them in variables and then combine all of these variables and links in the email body. My question is can this be done directly in the email body?
If the mobile phone number is not supplied have the text:
To get a mobile phone number, please click here.
<rest of the body>
NB here would be a hyperlink so it's not simply text.
If the mobile phone number is supplied have the text:
The mobile number you have selected is 123-456-789.
<rest of the body>
Hi D M,
Not really. What I've done subsequently is populate variables with the conditional text I want to display and then include these in the email body. You could equally do the same with the build string action. It's not as clean as I could like if you're working with rich text and want different colours/fonts etc within that conditional string.
This would be really handy!
I've got a task email and the customer wants to only show the submitter s annual leave balance if the request is for annual leave. I'm having to do an if statement first and set a variable to different text and then insert this in the email, but it's not formatted so looks silly in my nicely formatted email .
Why not do an If statement on the variables, depending on the result you have one email text or another. Or have 2 emails in the if statement. Based on if the variable is populated pick the email you want to send.