Skip to content
English
  • There are no suggestions because the search field is empty.

Tips and Tricks - Emit first non-empty value

Learn how to use the 'Emit First Non-Empty Value' action in APIANT’s Transform Text app to prioritize and output the first available non-empty value from multiple conditional branches, with an optional default fallback.

Consider this diagram, where lots of conditions are evaluated:

Document image
 

Then consider if after all of that you need to map a value that may come from more than one of those conditional branches, where depending on which branch is executed there is a priority order where you want to grab the first non-empty value.

There is a easy way to do that with the "emit first non-empty value" action in the Transform Text app:

Document image
 

Map in a list of values from the preceding actions. The first non-empty value in the list will be emitted when the action runs:

Document image
 

You can also define a default value to emit if all mapped values are empty.