Skip to main content
Nintex Community Menu Bar

Conditional string display

  • September 15, 2014
  • 13 replies
  • 17 views

Chris_Ben
Nintex Employee
Forum|alt.badge.img+14

Hi all,

 

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.

 

Thanks,

Chris

13 replies

Forum|alt.badge.img+9
  • December 4, 2014

Hi Richard,

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.

Kind Regards

Manfred


Forum|alt.badge.img+11
  • March 27, 2015

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!


Chris_Ben
Nintex Employee
Forum|alt.badge.img+14
  • Author
  • Nintex Employee
  • March 29, 2015

Hi guys,

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?

e.g.

If the mobile phone number is not supplied have the text:

     <preamble>

     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:

     <preamble>

     The mobile number you have selected is 123-456-789.

     <rest of the body>

Cheers,

Chris


Forum|alt.badge.img+7

Hey I have a similar situation, was this figured out?


Chris_Ben
Nintex Employee
Forum|alt.badge.img+14
  • Author
  • Nintex Employee
  • July 23, 2015

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.

Cheers,

Chris


Forum|alt.badge.img+5

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 sad.png.


Forum|alt.badge.img+11
  • July 6, 2016

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.


Forum|alt.badge.img+7

thank you!


Forum|alt.badge.img+16

Was this thread ever resolved?


Chris_Ben
Nintex Employee
Forum|alt.badge.img+14
  • Author
  • Nintex Employee
  • September 15, 2016

Not really other than the fact inline functions don't exist for this type of situation.  The closest answer is creating a variable that is dynamically generated.  I guess this nice thing about rich text fields is that you can embed HTML in it so the variable can contain HTML and it should resolve with some manipulation.  e.g. to create a table or a hyperlink.


Forum|alt.badge.img+14
  • Scholar
  • March 27, 2017

if you insist on having such an inline function you could write one on your own laugh.png

Create Custom Inline Functions - Nintex Forms 

 


Forum|alt.badge.img+11
  • April 26, 2017

‌ did this ever resolve your issue? If so, please mark the solution that was helpful.

Thanks,

Burkslm


Chris_Ben
Nintex Employee
Forum|alt.badge.img+14
  • Author
  • Nintex Employee
  • April 26, 2017

Hi Lisa,

As per my reply above, it's not really resolved.  If there was an official answer, it would be "no".  Marian has suggested the closest workaround so far.

Having in-line functions would signficantly cut down on the number of conditional + build string actions in a workflow. 

Thanks for the prompt though - it's caused me to go and create a uservoice suggestion.

Cheers,

Chris