Formulas

Add Formulas to an Object Type

Formulas compile data from numeric and variable values to generate conclusions, such as Incident Severity, Estimated Damage, or Likelihood the Incident Will Recur. Variable data is created from numeric data from other formulas, select lists, numeric or date fields, or workflow states that are added directly to an object type or from object types associated through a relationship or reference

A formula can be displayed on a form as a number, label (e.g. Low, Medium, High), numbers and labels, a gauge, or as a formula card. See the Formulas on Forms article for more information on configuring the display.  

For more information on formulas, see the following articles:

Instructions

To add a formula to an object type:

  1. Click the icon in the top bar > Object Types in the Data Model section.
  2. Click the object type or enter the name of the object type in the Search field, then click it to display the Edit Object Type page.
  3. Click the Formulas tab > Add Formula.
  4. Enter a name for the formula in the Name field (e.g. Estimated Vehicle Damage).
  5. Click Create.
  6. Click the new formula to open the Edit Formula palette.
    The Edit Formula palette.
  7. Click Add Variable.
  8. Select either Field, Relationship, or Reference from the Variable Type dropdown menu.
    • If you selected Field, choose a field or formula from the Available Components dropdown menu. The options in this dropdown are fields or formulas added directly to the object type.
    • If you selected Relationship or Reference
      1. Select a relationship or reference saved to the object type from the Relationship or Reference dropdown menu. 
      2. Select a field, formula, or workflow state from the Available Components dropdown menu. These are the fields, formulas, or states saved to the object type(s) in the relationship or reference.
      3. Select a variable sub-type from the Sub Type dropdown menu to specify how the data from multiple objects will be compiled, calculated, and displayed. See the Variables, Operators & Functions article for more information on the sub-types and relationship/reference variables.
        Select lists can be used in formulas only if numeric values have been added to their options. See the Select List Fields article for more information.
  9. Optional: If you wish to use a name other than the field’s unique name, enter it in the Name field. Numbers, special characters, and spaces are not permitted. 
    Naming a variable after a function will result in an error.
  10. Optional: Enter a description of the variable in the Description field, which will appear below the variable in the Edit Formula panel.
    A new variable in the Edit Formula panel.
  11. Optional: Select the Treat empty values as Null checkbox if objects with blank variables should not be assigned a zero (0) value. See the Null Values in Formulas article for more information.
  12. Click Create.
  13. Follow steps 8-12 above to continue adding more variables as needed.
  14. Using the variable name(s), enter the formula, including any operators and/or functions, in the Formula field (e.g. SUM(BLUBOOKVA)). See the Variables, Operators & Functions article for more information.
    A formula entered in the Formula field using the variable name(s) (in this case, BLUEBOOKVA).
  15. In the Display section, select either None or Numeric from the Format dropdown menu. If you selected Numeric, you can choose how the numbers will be displayed by clicking an option in the table to the left (i.e., Num, %, 0.00, .etc).  A preview of the number format is displayed in the Layout field. 
    The display options for formulas. Selecting an option other than None in the Range as dropdown will reveal additional options.
  16. Select an option from the Range as dropdown menu:
    • None: The formula will display the numeric results only.
    • Label: The formula will display the range labels only (e.g. Low) in the color selected for that range.
    • Label and Result: The formula will display the numeric results and labels (e.g. Low – 1000) in the color selected for that range.
    • Result: The formula will display the numeric results only in the color selected for that range.
  17. If you selected any option other than None in the Range as dropdown menu above, formula labels of Low, Medium, and High are automatically created. To configure the labels:
    1.  Click the icon next to the range you want to edit.
    2. Click the Color dropdown menu to reveal the color picker and select a new color for the label. You can also type a hex color into this field to select a color.
    3. Enter a new name for the label in the Label field.
    4. Enter a numeric maximum value in the Max Value field.
    5. Click the to save your changes.
    6. To delete a range, click the icon.
    7. To add a new label, click Add Label, then follow steps b-e above.
      The default formula labels.
  18. Click Done.
  19. To edit the formula, click it in the tab to open its settings.
  20. To delete the formula, click the  icon.
  21. Click Done when finished. 
If changes are made to the display of an existing formula, you must click Reformat Formulas from the Edit Object Type page before those changes are displayed.
Clicking Recalculate Formulas recalculates all the formulas in your organization. As such, this action should be performed only when required.

Add a Condition to a Transition

Conditions allow you to control whether an object is moved to a certain state or if an action will be performed. This is done by using fields, formulas, and workflow states to create a formula with parameters that must be met before the transition or action can occur. For more information on formulas, see the following articles:

EXAMPLE
Your company has a policy that severe incidents must skip the typical review process and must be investigated immediately. As such, for the Incident object type workflow, you create a condition on the Submit for Review trigger that if the “Severe” option has been chosen on the Incident Severity select list, the object is automatically transitioned to the Investigation Required state once the Submit for Review trigger is clicked on a form.

A condition on a transition, as displayed in the Edit Trigger palette on the right.

To add a condition on a transition:

Ensure the state, trigger, and transition you wish to add the condition to have already been created and configured prior to following the steps below.
  1. From the Edit Workflow page, click a trigger to open the Edit Trigger palette.
  2. Click the  icon next to the transition.
  3. Click Add Condition.
    The Edit Trigger palette where you can add conditions and actions.
  4. Optional: Enter a name for the condition in the Name field. Conditions are named Default Condition Formula by default.
  5. Click Add Variable.
  6. Select either Field, Relationship, or Reference from the Variable Type dropdown menu:
    • If you selected Field, choose a field or formula from the Available Components dropdown menu. The options in this dropdown are fields or formulas added directly to the object type.
    • If you selected Relationship or Reference
      1. Select a relationship or reference saved to the object type from the Relationship or Reference dropdown menu. 
      2. Select a field, formula, or workflow state from the Available Components dropdown menu. These are the fields, formulas, or states saved to the object type(s) in the relationship or reference.
      3. Select a variable sub-type from the Sub Type dropdown menu to specify how the data from multiple objects will be compiled or calculated. See the Field & Formula Variables and/or Workflow State Variables sections of the Variables, Operators & Functions article for more information on the available sub-types.
        Fields can be added to formulas only if they’ve been added directly to the object type or if they’re saved to an object type associated through a relationship or reference. Only numeric fields, date fields, and select lists with numeric values added to their options are accepted in formulas. See the Fields category for more information.
  7. Optional: Enter a name for the variable in the Name field. By default, the unique ID of the field or formula is automatically populated.A new condition formula.
    Naming a variable after a function will result in an error.
  8. Optional: Enter a description for the formula in the Description field.
  9. Optional: Select the Treat empty values as Null checkbox if objects with blank variables should not be assigned a zero (0) value. See the Null Values in Formulas article for more information.
  10. Click Create.
  11. Continue adding variables by following steps 5-10 above. To remove a variable, click the  icon beside the variable.
    An existing variable on a condition.
  12. Using the variable name(s), enter a formula, including any operators and/or functions, in the Formula field (e.g. INCIDENTSE==3)). See the Variables, Operators & Functions article for more information.
    Creating a new formula using the variable name.
    You must use double equal signs (==) in condition formulas. See the Variables, Operators & Functions article for more information.
  13. Click Done.