IF Function(Expr, Num1, Num2, Num3)

Numeric Expression or String Expression (determined by type of field to be returned)

Evaluates a logical and/or mathematical expression and returns one value if the expression is TRUE (Num1), another if the expression is FALSE (Num2), and, optionally, a third value if the expression evaluates to MAYBE.

If the third value is omitted, a result of MAYBE is treated like a result of FALSE.

Example:

IF(3<5,"x","y") returns "x"

You can specify multiple conditions by nesting an IF field inside an IF field.

Example:

IF(VAR>20,"High", IF(VAR>10,"Moderate","Low"))

Expr=VAR>20

Num1="High"

Num2=IF(VAR>10,"Moderate","Low)

Example:

In this example, special rates are offered only to residents of California and Washington. If the State field specifies any other state, no additional text is printed because no alternative text has been specified in the second IF field.

IF(STATE = "CA", "10% Discount Available", IF(STATE="WA", "15% Discount Available", ""))