Logical Operations in the Expression Builder
You can mimic your complex business rules using logical operations in the expression builder. This table provides descriptions, rules, and examples of available expression terms for logical operations.
Expression Term |
Details |
---|---|
CHOICE |
Syntax: (Condition 1*, Value 1*, Condition 2, Value 2, ...Condition n, Value n, Value Z*) Inputs: The following list includes required and optional inputs:
Return data type: String, Number or Date depending on value entered. Description: Allows users to use the equivalent of the IF, THEN, ELSE logic. Allows users to select different results based on different conditions. It evaluates the conditions from first to last, so if Condition 1 is TRUE, then it will give Value 1. However, if Condition 1 isn't TRUE, then it will check if Condition 2 is TRUE. If it's true, then it will give Value 2, and so on. If no earlier condition is TRUE, then it will give the final value, Value z. Examples: The following examples show the use of CHOICE.
Exceptions: If any of the input conditions aren't Boolean, then an error occurs. |
IS_EQUAL |
Syntax: IS_EQUAL (Value 1*, Value 2*) Inputs: The following is a list of required inputs:
Return data type: Boolean (TRUE or FALSE) Description: If Value 1 is equal to Value 2, then it returns TRUE. Otherwise, it returns FALSE. It's used within the input conditions of the CHOICE function. Examples: The following examples show the use of IS_EQUAL.
Exceptions: The following is a list of exceptions:
|
IS_NULL |
Syntax: IS_NULL (Value*) Input: Value (Required): Can be a string or date or number or Boolean Return data type: Boolean (TRUE or FALSE) Description: If the value is null, then it returns TRUE. Otherwise, it returns FALSE. It's used within the input conditions of the CHOICE function.
Example: Exception: If the input causes an error, then it will cause an error. |
IS_GREATER |
Syntax: IS_GREATER (Value 1*, Value 2*) Inputs: The following is a list of required inputs:
Return data type: Boolean (TRUE or FALSE) Description: If Value 1 is greater than Value 2 (or later in the case of dates), then it returns TRUE. Otherwise, it returns FALSE. It's used within the input conditions of the CHOICE function. Examples: The following examples show the use of IS GREATER.
Exception: If any inputs are null, then it returns FALSE. |
IS_LESS |
Syntax: IS_LESS (Value 1*, Value 2*) Inputs: The following is a list of required inputs:
Return data type: Boolean (TRUE or FALSE) Description: If Value 1 is less than Value 2 (or earlier in the case of dates), then it returns TRUE. Otherwise, it returns FALSE. It's used within the input conditions of the CHOICE function. Examples: The following examples show the use of IS_LESS:
Exceptions: If any inputs are null, then it returns FALSE. |
IS_BETWEEN |
Syntax: IS_BETWEEN (Value to evaluate*, Minimum Value*, Maximum Value*) Inputs: The following is a list of required and optional inputs:
Return data type: Boolean (TRUE or FALSE) Description: If the value to evaluate falls between the minimum value and the maximum value, or is equal to either of them, then it returns TRUE. Otherwise, it returns FALSE. It's used within the input conditions of the CHOICE function. Examples: The following examples show the use of IS_BETWEEN:
Exceptions: If any inputs are null, then it returns FALSE. |
AND |
Syntax: AND (Condition 1*, Condition 2*, ...Condition n) Inputs: The following is a list of required and optional inputs:
Return data type: Boolean (TRUE or FALSE) Description: If all conditions are TRUE, then it returns TRUE. Otherwise, it returns FALSE. It's used within the input conditions of the CHOICE function.
Example: Exception: If any inputs are null or not Boolean or cause an error, then it will cause an error. |
OR |
Syntax: OR (Condition 1*, Condition 2*, ...Condition n) Inputs: The following is a list of required and optional inputs:
Return data type: Boolean (TRUE or FALSE) Description: If any of the conditions are TRUE, then it returns TRUE. Otherwise, if all conditions are FALSE, then it returns FALSE. Its used within the input conditions of the CHOICE function.
Example: Exception: If any inputs are null or not Boolean or cause an error, then it will cause an error. |
NOT |
Syntax: NOT (Condition*) Input: Condition (Required): Boolean (TRUE or FALSE) Return data type: Boolean (TRUE or FALSE) Description: It reverses the Boolean value of the input so that it returns TRUE if the input condition is false, and FALSE if the input condition is true. It's used within the input conditions of the CHOICE function. Examples: The following examples show the use of NOT:
Exception: If the input is null or not Boolean or causes an error, then it will cause an error. |
IS_LIKE |
Syntax: IS_LIKE (Value 1*, Value 2*) Inputs: The following is a list of required inputs:
Return data type: Boolean (TRUE or FALSE) Description: If Value 1 matches a portion of Value 2, then it returns TRUE. Otherwise, it returns FALSE. The wildcard (%) determines which portion to match. It's used within the input conditions of the CHOICE function Note: While creating the inputs and arguments add the percent
sign (%) as part of the constant instead of entering it as an Operator
button provided.
Examples: The following examples show the use of IS_LIKE.
Exception: If any inputs are null, then it returns FALSE. |
IS_IN |
Syntax: IS_IN (Value*, In Value 1*,...In Value n) Inputs: The following is a list of required and optional inputs:
Return data type: Boolean (TRUE or FALSE) Description: If Value is equal to any of the In Values, then it returns TRUE. Otherwise, it returns FALSE. It's used within the input conditions of the CHOICE function. Examples: The following examples show the use of IS_IN:
Exception: If any or all inputs cause an error, then it will cause an error. |