Workflows and approvals

How do I write step and branch conditions and dynamic assignees?

Use Field IDs, join values with || or &&, use .has() for multi-select fields, and assign steps to user fields or formulas.

How-to

Short answer: Write conditions with Field IDs, not labels. Compare one value per clause, join clauses with || or &&, and use .has() for multi-select fields.

Why it happens

Steps get skipped, or the flow jumps to the end, when a condition doesn't evaluate as you expect. Common causes:

  • A field label is used instead of the Field ID.
  • The condition sits on a step when it belongs on the branch.
  • AND is used where OR was meant, or several values are packed into one comparison.
  • = is used on a multi-select field, which holds a list, not a single value.
  • The condition value doesn't exactly match the dataset or user attribute.

How to fix it

  1. Click the step, and under When does this step happen? select Based on condition. See conditional steps.
  2. Use the Field ID shown in the form builder. Common patterns:
    • Yes/No: Field_ID = true()
    • Dropdown: Field_ID = "Value", matching the option exactly
    • Currency: Amount.value() > 10000
    • Skip when two user fields hold the same person: Division_Manager <> Reporting_Manager
  3. For several values, write one comparison per value: Type = "A" || Type = "B" || Type = "C". Don't write Type = "A, B". The or() function takes only two arguments. See logical expressions.
  4. For multi-select or checkbox fields, use Fee_type.has("Full Refund"), or .hasAll("x", "y") to require every value. Values are case-sensitive. Using = gives a type error about StringList. See list expressions.
  5. For branch routing, put the condition on the branch, not on the step inside it. Give each parallel branch its own condition.
  6. To use multi-select values in text or emails, extract them with Checkbox_field.concatenate().
  7. Run Simulate to test each path.

To assign a step dynamically:

  • Initiator's manager: _created_by.Manager. The Manager column must be filled in user management.
  • First two people from a multi-user field: userandgrouplist(Approver.get(1).Email, Approver.get(2).Email). See user expressions.
  • A different person each time: assign the step to a user field. See assigning steps.

Important

If items won't submit at a step, check that step's formula and any validation on the Submit button under Permissions > Configure actions.

Related answers