How do you concatenate two fields conditionally?


Badge +2

Is it possible to concatenate two fields conditionally based on the value in another column value provided on a form?

Looks the If statement doesn't include Then Else clause, so instead do you use Form Variables?


4 replies

Userlevel 6
Badge +16

You can use the "Calculated Value" Control and write a formula like this one:

If(contains(Title,"HI"),Title+From,From+Title)


That formula is based on this statement :

IF (Title contains "HI")

     Control Value = Title + From

ELSE

     Control Value = From + Title

Userlevel 5
Badge +12

Are you wanting to display the value on your form?  If so, using the calculated field as Fernando suggested is good.  If you don't need it on the form immediately, then you can do it many ways within the workflow, such as using a Build String action and concatenating values there as well.

Thanks,

Mike

Badge +2

Actually I was using the calculated value in a form like Fernando mentioned above.  Thanks for the ideas gentleman!

Badge +2

Hello,

How do you concatenate text with a named control in the formula builder? See attached. 

Thank you!

9664i43A5B7CBF01256E5.png

Reply