Defining a Condition with Formulas

Use the Formula Builder to define conditions with formulas. Formulas are evaluated when 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 build them with the Formula Builder.

Rules and Guidelines for Using Formulas

To avoid errors with formulas, follow these rules and guidelines.

Formula Builder Parameters

The following table lists the Formula Builder's parameters and how to use them:

Parameter

Description

Function

Select an SQL or JavaScript function to include in the formula. When you select a valid function, it appears in the Formula box. If the function isn't valid, it won't appear. The list of functions isn't exhaustive. You can use functions not listed here in your formulas.

The available functions change based on the workflow, action or transition trigger type.

Join

Select a record type to join with the base record type for the workflow. You can then use a field from the joined record. This option is available only in conditions where the workflow element uses a server-side trigger.

Value Field

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

Formula

The formula automatically appears in the Formula field with your selected options. You can change the formula's logic by editing it here.

You can also type a formula in this field yourself if the function you need isn't in the Function list. You can also change the logic created by the Formula Builder.

To create a formula with the Formula Builder:

  1. Open the workflow, 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. Replace the function's argument placeholders 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