![]() |
|
![]() |
IIf FunctionThe IIf function in Expression Builder returns one of two parameters based on the evaluation of a conditional expression. IIf is an abbreviation for Immediate If. SyntaxIIf(expr, result_if_true, result_if_false) Alternate SyntaxIIf(expr, expr_if_true, expr_if_false) Mixed SyntaxIIf(expr, result_if_true, expr_if_false) IIf(expr, expr_if_true, result_if_false) Result TypeThe result type of the IIf() function is always the type of its first argument. If the expression evaluates to FALSE, the second argument is converted to the type of the first argument before its value is returned. ArgumentsThe following table describes the arguments for the function.
ExamplesThe following is an example of mixed syntax in the IIf function: A business process requires that the Region field on an account detail page is to be updated when the Billing State field is changed as follows: If the Billing State field is changed to OK or TX, the region field is to be updated to Central. If the Billing State field is changed to CA, the Region field is to be updated to West. For all other states, the Region field is to be updated to East. IIf([<PrimaryBillToState>]='OK' OR [<PrimaryBillToState>]='TX', 'Central', IIf([<PrimaryBillToState>]='CA', 'West', 'East')) Related InformationSee the following topics for related Expression Builder information: | ||||||||||||||
Published May 2008 |