Applies to
Add Entity Utility Function
With the Add Entity module, you can set the value of a state using data you bring into the workflow.
It can be useful instead of using vertical bars. Instead only use two references once in Add Entity and reference the output of the state throughout the workflow.
For example, if you have a workflow where some kind of status data can be returned both as a value in an array or as a value, not in an array, and you need to reference that value elsewhere in your workflow you have to reference both.
To keep track of the same reference all the time, drag in a new state into the workflow and give it a name, e.g. status. The state needs to be above any modules that need to use the status returned.
Below the module where your workflow gets the value to reference drag in the module Add Entity.
In the field State Name enter the name of the state you just added.
In the field Entity Value enter the reference to the values you want to set the state to, {{||}}. This will set the value of the state using the reference that isn't empty.
In subsequent modules where you need to reference the status, use the output of the state you created instead (you can find it by clicking on the state and copy the value under Output in the panel for the state)
The image above shows a simplified example where a row is updated with one of two possible values. Instead of using two or more references, divided by vertical bars, in the Update Row module the output of the state Status used.