Home     Tour     Features     Order     Support     Contact  

If/Else/End Macros

[Professional and Corporate Editions Only]
The If, Else, and End macros let you insert a conditional text into your message.

#/If(Condition)/#Text 1#/Else/#Text 2#/End/#

Condition consists of the name of a Data Field, a comparisonoperation, and a Value that the data field is compared to.

Data Field is the name of the data field. It also can be Email Address to represent recipients email address.

Value depends on the type of the data field to be used.

For text type fields this must be a text. You can use a star (*) to create a pattern.

*text means everything ending with text.
text* means everything starting with text.
*text* means everything containing the text.

For number and currency type fields, the value must be a valid number.

For date type fields, the value must be a date in MM/dd/yy format.

For time type fields, the value must be a time in HH:mm:ss format.

For moments type fields, it must be a combination of date and time (date first).

For condition type fields, it must be either on or off word.

Operation is one of the comparison signs <, <=, =, <>, >=, >. Not all operations are applicable to all data types.

There are two special cases =* means known , and <>* means unknown.

See below for the examples of conditions.

Text 1 will only be inserted in the message if the recipient meets the condition.

Text 2 will only be inserted in the message if the recipient does not meet the condition. If Text 2is empty, the #/Else/# part may be omitted.

Both Text 1 and Text 2 may contain macros, including other If macros.

Examples of the If macro usage:

The following example compares the value stored in the Balance data field to zero and inserts the corresponding text into the message:

#/If(Balance < 0)/#
Please pay #/Text(Balance)/#.
Your account has positive balance. No payment is required at this time.

The following example inserts a country specific text and shows how to use nested If macros.

#/If(Country Code = US)/#
We offer free shipping to any US destinations.
#/Else/##/If(Country Code = CA)/#
We offer special rates on shipping to Canada.
We can ship worldwide, and our shipping rates are very competitive.

The following example demonstrates text based comparison. The vegetarian part will be included for all recipients who has a word vegetarian anywhere in the Preferences data field.

#/If(Preferences = *vegetarian*)/#
Please let us know if you are coming to our party as soon as you can, so that we could order a special vegetarian meal for you.
Please make your selection of chicken, pork, or beef and let us know as soon as you can.#/End/#

The last example shows how to use If macros without Else and will insert the text only for recipients whose email address ends with @aol.com.

#/If(Email Address = *@aol.com)/#
Unfortunately, America Online does not support this feature.

The If Macro dialog helps you edit the conditions.

 Home     Tour     Features     Order     Support     Contact  

Copyright © 1995-2014 Northern Software Inc. All Rights Reserved