07-11-2025 05:17 PM
Hi everyone.
07-11-2025 09:11 PM
Your request is a little unclear but I get the idea.
This part is unclear:
If 'Goal' is empty, then it skips it. Similarly for 'Campaign Purpose', 'Target Audience' and 'Value Proposition' all concatenated under the same 'Description' field.
Do you mean "If Goal is empty, skip the entire concatenation step and do nothing"? Or do you mean, "The formula only concatenates the values that are present"?
You can concatenate the values like this. The smart_join method will skip null/blank values. You can use any delimiter characters you want in smart_join.
[ Goal, Campaign, Target, Value].smart_join(" - ")
If you want to do this conditionally based on the presence of Goal and Campaign, you can use the below.
Goal.present? && Campaign.present? ? [ Goal, Campaign, Target, Value].smart_join(" - ") : ""
The above formula is called a ternary operator which a really fancy way of saying "minimalist if statement" which is also a really fancy way of saying "if". It's used constantly in Workato. The basic format is:
[boolean] ? [result if true] : [result if false]
Hope this helps!
07-13-2025 04:01 AM - edited 07-13-2025 04:08 AM
Hi @habeebkhan
Here’s how I usually handle this scenario — using ternary operator , .present?, skip, and smart_join("\n") to build the description dynamically based on available input. This avoids using multiple IF steps and keeps everything within a single formula.
It checks each field, adds it only if present, and neatly joins them with line breaks. Efficient and clean!
My Output:
My input for the above output: