Evaluates an expression and returns one of two specified values according to the results of the evaluation.
if( expression, trueresult, falseresult ) any type
expression
Boolean value. If it evaluates to true, the function returns the contents of trueresult, otherwise it returns the contents of falseresult.
trueresult, falseresult
Values of any type, as long as both are of the same type. The return value of the function is therefore of the same type as trueresult and falseresult.
This example changes the text to display according to the current value of a variable.
show(if(&pagenumber=1,'Customer Copy','Store Copy'))