This article explains how to use the Get First Non-Empty Value action to return the first populated value from a set of candidate values, and how to use it to consolidate values from dependent fields, such as state-specific city dropdowns, into a single value.
Applicable Plans: Available on all plans.
What it does
The Get First Non-Empty Value action checks a set of candidate values in order and returns the first one that is not empty. It treats blank values, and values that read as null, None, or undefined, as empty.
This is useful when a workflow needs to pull a value from one of several fields, but only one of those fields is populated at a time. For example, a form might present a State dropdown with a dependent Cities field for each state — State1 Cities, State2 Cities, and so on — where only the field matching the selected state actually contains a value. The Get First Non-Empty Value action lets you check all of these city fields at once and consolidate the result into a single value.
Available options
| Field | Description |
|---|---|
| Values | The text containing the candidate values to check, separated by the delimiter. Required, text. Use Insert Merge Fields to add ticket or contact field values instead of typing them directly. |
| Delimiter | The character or text used to split the Values field into separate items. Optional, text. Defaults to a comma if left blank. |
Note: The Values field has no practical character limit, so you can check a long list of candidate values without running into truncation issues.
How to use it
- In your workflow, click Add Action (the + icon) where you want to add this action.
- Search for Get First Non-Empty Value under Inbuilt Actions, then select it.
- In the Values field, enter the candidate values you want to check, separated by your chosen delimiter. Use Insert Merge Fields to reference merge fields instead of typing static text.
- Optionally, enter a character in the Delimiter field to separate the values. Leave it blank to use a comma as the default.
- Click Run Test to confirm the action returns the expected value.
- Review the result under Non Empty Value in the Data Out tab of the test results panel.
- Click Save or Save & Test to save the action.
Warning: If any candidate value contains the delimiter character itself, the action splits on every instance of that character and breaks the value into unintended pieces. Choose a delimiter that does not appear anywhere in the values you are checking.
Notes
- The output is available downstream as Non Empty Value, and can be referenced in subsequent actions the same way as any other action output.
- If none of the candidate values are non-empty, the action fails with the error message No valid non-empty value found in the input. Add at least one field with a fallback or default value to the Values list to prevent this.
The Get First Non-Empty Value action is now available to consolidate values in your workflow. Next, see how to use merge fields and dynamic variables to reference ticket and contact fields as candidate values.