{ IF Expression1 Operator Expression2 TrueText FalseText }
Compares two values and then inserts the text appropriate to the result of the comparison. If used in a mail merge main document, the IF field can examine information in the merged data records, such as postal codes or account numbers. For example, you can send letters to only those clients located in a particular city.
Instructions
|
|
---|---|
|
|
|
|
|
|
|
|
|
|
|
|
Note If the operator is = or <>, Expression2 can contain a question mark (?) to represent any single character or an asterisk (*) to represent any string of characters. Expression2 must be enclosed in quotation marks so that it's compared as a character string. If you use an asterisk in Expression2, the portion of Expression1 that corresponds to the asterisk and any remaining characters in Expression2 cannot exceed 128 characters.
Examples
The following example specifies that if the customer order is greater than or equal to 100 units, the result is "Thanks"; but if the customer order is fewer than 100 units, the result is "The minimum order is 100 units".
{IF order>=100 "Thanks" "The minimum order is 100 units"}