Download page Defining formulas within a workflow.
Defining formulas within a workflow
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
Open the workflow definition for which you want to create a formula.
Click Settings tab and select Formulas menu from the left panel.
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.
Enter the Name and Description for the formula.
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.
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.
Click Insert to add the selected field to the formula.
To include a function in your expression, click the Functions tab, select a function, and click Insert.
To add operators, use the toolbar below the expression window as needed.
Continue building your formula. To remove the entire expression, click Clear, or press the Backspace key to manually remove specific parts.
Click Validate to check the formula. The system will confirm if it is valid or display an error message if it is not.
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.