The 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.
IIf(expr, result_if_true, result_if_false)
IIf(expr, expr_if_true, expr_if_false)
IIf(expr, result_if_true, expr_if_false)
IIf(expr, expr_if_true, result_if_false)
The 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.
The following table describes the arguments for the function.
The 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'))
See the following topics for related Expression Builder information:
|Published 5/4/2012||Copyright © 2005, 2012, Oracle. All rights reserved. Legal Notices.|