Defining a Condition with Formulas

Use the Formula Builder to define conditions with formulas. Formulas are evaluated at the time a workflow triggers or an action or transition executes. Formula definitions can include internal field IDs, SQL functions, JavaScript, SuiteScript, and mathematical operators. You can manually enter formulas or develop them using the Formula Builder.

Rules and Guidelines for Using Formulas

To avoid errors with formulas, adhere to the following rules and guidelines.

Formula Builder Parameters

You can find the Formula Builder's parameters and a description of how to use them in the following table:

Parameter

Description

Function

Select an SQL or JavaScript function to include in the formula. When you select a valid function, it populates in the Formula text box; otherwise, it will not appear. The list of functions is not exhaustive. You can use in formulas functions that do not appear in the list.

Different functions appear in the list depending on the workflow, action or transition trigger type.

Join

Select a record type that can be joined with the base record type for the workflow. You can than source a value of a field from the joined record. This option is only available in conditions where the workflow element users a server side trigger.

Value Field

Select the Field from the workflow base record or from the joined record that you want to use in the formula. The Formula Builder enters the internal NetSuite ID for the field in the Formula.

Formula

The formula automatically populates in the Formula field with the selected options from the Formula, Join, and Value Field fields. You can modify the formula's logic by manually editing it in this field.

You can also manually type the formula in this field. This is useful when the function you need to use is not available in the Function list. It's also a convenient way to modify the logic of the formula created by the Formula Builder.

To create a formula with the Formula Builder:

  1. Open the workflow definition, action, or transition definition.

  2. Select Custom Formula in the Condition section.

  3. Click the Open icon to open the Condition Builder.

  4. Enter your condition criteria. For more information, see Formula Builder Parameters.

  5. Modify the function's argument placeholders by substituting the placeholder with the field id you want to use in the formula.

    For example, to test if the length is greater than 10, replace:

                    LENGTH(char){custrecord65} 
    
                  

    with:

                    LENGTH({custrecord65}) > 10 
    
                  
  6. Click Set to return to the workflow, action, or transition definition.

Related Topics

General Notices