IF Merge Method

Usage | Parameters | Examples | Remarks

The IF merge method selects one of two values depending on the result of a logical expression. An IF statement can have two results. The first result is if your comparison is True, the second if your comparison is False.

Usage

IF([Expression],[TrueValue],[FalseValue])

Selects a result based on the logical expression

Parameters

 Expression  Comparitor

An expression comparing one value with another in order to arrive at a true or false result. Text values should be single quoted. Numeric values should not. For further information on expression usage and syntax, read the logical expression section.

 TrueValue  Text

The value to be assumed if the result of the expression is true. Single quotes (') should be double quoted ('').

 FalseValue  Text

The value to be assumed if the result of the expression is false. Single quotes (') should be double quoted ('').

Examples

Example 1

Place documents into "Files for Greg" only if Greg scans them, otherwise place the documents in the folder named "Files for Everyone".

Example of selecting an export folder based on the user

Example 2

Invoices over $1000 should be placed in a folder called "Low Value Invoices", otherwise place them in the folder named "High Value Invoices".

Example of selecting an export folder based on the numeric value of a zone

Example 3

Set a zone's default value based on the day of the week.

<<IF(['<<DateTime(ddd)>>'='Mon'],[Early],[Late])>>

In the example above, if the day is Monday, the value would be "Early", otherwise it would be "Late".

Example 4

Set a zone's default value to one of two other zone values based on the time of day.

<<IF([<<DateTime(H)>><12],[<<Morning>>],[<<Afternoon>>])>>

In the example above, if the time is less than 12pm midday, the value would be set to the value of the zone "Morning", otherwise it would be set to the value of the zone "Afternoon".

Remarks

If the text results are to contain a single quote (') then the quote will need to be double quoted. For example, the syntax below would not work.

<<IF(['<<UserName>>'='greg.b'],[Greg's Files],[Everyone's Files])>>

Instead, this should be configured like this.

<<IF(['<<UserName>>'='greg.b'],[Greg''s Files],[Everyone''s Files])>>

Alternatively, when merging in an index value, this could be automatically handled with a replace method like this.

<<IF(['<<UserName>>'='greg.b'],[<<Replace([<<GregFolder>>],['],[''])>>],[<<Replace([<<EveryoneFolder>>],['],[''])>>])>>