Contact Us 1-800-596-4880

Building Formulas for Flows

Manipulate data in Composer by building expressions and applying functions. Using the Custom Expression Editor, create expressions that include functions and mathematical operators. Use the editor also to truncate words, capitalize phrases, and set the date.

When building formulas for a flow, keep in mind that:

  • You can nest functions and use the input parameters of another function call for your function.

  • Composer functions used in Composer are built using DataWeave.

  • Composer functions treat empty spaces as empty space characters in a formula.

Access the Custom Expression Editor

To access the Custom Expression Editor:

  1. From the Composer Flows tab, open a flow.

  2. Click Edit.

  3. In an action field, in a value in the query builder, or in the value of an If/Else Block control, select Custom Expression fx from the drop-down menu.
    The Custom Expression Editor appears.

Add a Custom Expression to an Action

When adding a custom expression, place the cursor over elements in the Custom Expression Editor window to trigger context popovers containing helpful suggestions and in-app support.

To add a custom expression to an action:

  1. In the Custom Expression Editor left pane, click one of the following tabs:

    1. Function, to view or search for a function

    2. Data, to view or search for a field or data pill

    3. Operator, to view or search for an operator

  2. Select the available functions, fields, data pills, or operators for your custom expression from the left pane.
    Your selections appear in the <Field Name> box in the right pane. The syntax of your custom expression is validated automatically.

  3. If you want to reuse the expression in the <Field Name> box in another field, copy it.

  4. After the custom expression is created and validated, click Apply.

  5. Click Save.
    The custom expression is added to the field.

Edit a Custom Expression

To edit an existing custom expression in an action:

  1. From the Composer Flows tab, open a flow.

  2. Click Edit

  3. In an action field containing your custom expression, click the pencil icon.
    The Custom Expression Editor appears.

  4. In the <Field Name> box in the right pane of the Custom Expression Editor, either select and delete the existing custom expression or place your cursor where you want to add items from the left pane.

  5. In the left pane, select from the available functions, fields, data pills, or operators.
    Your selections appear in the <Field Name> box in the right pane. The syntax of your edited custom expression is validated automatically.

  6. After your custom expression is edited and validated, click Apply.

  7. Click Save.
    Your custom expression is edited.

Delete a Custom Expression

To delete an existing custom expression in an action:

  1. From the Composer Flows tab, open a flow.

  2. Click Edit

  3. In an action field containing a custom expression, click the X icon.
    The custom expression is deleted from the field.

  4. If your implementation requires this field to contain a value, either add a new custom expression or select a value from the drop-down menu.

  5. On the Flow Details page, click Save.
    The custom expression is deleted. If your environment requires a value in the custom expression field, your addition or selection is saved.