This function manipulates the database output without changing the content. Its purpose is to make a conditional selection from the database.
|
Syntax |
IF(logical_test, value_if_true, value_if_false) |
|
Description |
Returns "value_if_true" if "logical_test" is True. It returns "value_if_false" if "logical_test" is False. |
|
Example |
IF([Country]="US", "United States of America", "Other parts of the world") |
In this example, the IF function checks the database field [Country], if it contains "US", it returns the string "United States of America". If the database field contains anything else, it returns "Other parts of the world".
You can use the IF function, for example, to create a salutation. See "Inserting a Salutation".