PROVIDED

PROVIDED allows conditional assignments to be made, depending on the value of a Boolean expression. It is used for conditional formulas for calculated fields.

Syntax: 

<expression> PROVIDED <boolean_expression>

Return Value: 

NCDTY value_to_assign

Description: 

The calculated field takes the value of the expression if the boolean_expression is TRUE, but is set to zero for numeric fields or the null value for other types of field if it is FALSE.

Example:

If field LARGE_ORDER has the formula:

ORDER_VALUE PROVIDED ORDER_VALUE > 400

and field SMALL_ORDER has the formula:

ORDER_VALUE PROVIDED ORDER_VALUE <= 400

Then, the output looks like this:

ORDER_VALUE    LARGE_ORDER    SMALL_ORDER

500.00 500.00 0.00
200.00 0.00 200.00
7.00 0.00 7.00