Contact Free trial Login

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.

About this task

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.)

Procedure

  1. Open the card in which you want to add a DataWeave expression to a field.

  2. Click Custom Expression in 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.

  3. Click the arrow in expression entry, then click Expand in the window that appears below the entry.

  4. 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.

Was this article helpful?

💙 Thanks for your feedback!

Edit on GitHub