The Formula feature enables you to create expressions that calculates the value of a field within a workflow. These formulas can be applied across various activities wherever needed. This section describes creating formulas within a workflow definition.

To create a formula

  1. Open the workflow definition for which you want to create a formula.
  2. Click Settings tab and select Formulas menu from the left panel.
  3. Click New Formula to open the formula builder. Here, you can create expressions to calculate field values. All fields from the context object are available to use.
  4. Enter the Name and Description for the formula.
  5. Select the Data Type from the dropdown to define the output data type of the calculated expression at runtime. Supported data types include String, Integer, and Decimal.
  6. Formulas can include context record fields, functions, or variables. Search for Context Record field, click the arrow next to a field name to view and select related child fields. The chosen field or subfield will then appear in the right panel.

    For context record fields, the application currently supports only Id and Name child fields for Lookups. Related Lookup child fields are not supported.

  7. Click Insert to add the selected field to the formula.

  8. To include a function in your expression, click the Functions tab, select a function, and click Insert.
  9. To add operators, use the toolbar below the expression window as needed. 
  10. Continue building your formula. To remove the entire expression, click Clear, or press the Backspace key to manually remove specific parts.
  11. Click Validate to check the formula. The system will confirm if it is valid or display an error message if it is not.
  12. Click Submit button to add the formula.

The formula is listed under the Formulas section and can be used in relevant activities where field properties can be set. You can edit, clone, or delete the formula from the Formulas listing page.

Before deleting a formula, verify if it is being used in any activity. Removing a formula that is part of one or more activities can impact the workflow execution.