Create a DataWeave Expression in a Field (Flow Designer)
You can create DataWeave expressions in fields in cards, mixing expressions with text or using them alone, to create dynamic values when flows are triggered at runtime. A new editor provides aids for creating expressions.
Every card in a flow presents a list on its right side. The first entry in the list is labelled
Custom Expression. (Other entries in the list appear when a card is preceded by at least one other card. However, for this task, you need only the
Custom Expression entry.)
Open the card in which you want to add a DataWeave expression to a field.
Custom Expressionin the list on the right side of the card and drag it into the field.
When you drag the Custom Expression element, the card highlights the borders of the fields that you can drop it into.
Click the arrow in
expressionentry, then click Expand in the window that appears below the entry.
Compose your expression with the help of the right side of the editor.
Select the Add Data pane to choose from payload elements, attributes, and variables to add to the expression. Click to add them at the point in the expression where the cursor is located.
Select the Add Functions pane to choose from DataWeave functions. Click to add them at the point in the expression where the cursor is located. Clicking a function also displays a description of it.