Online Chat
 Call Us: 
1-877-744-1221
Browse Submit a Ticket
 
Advanced Search
Tools
Rss Categories

"IF" condition

Author: Eileen Wilde Reference Number: AA-00170 Views: 6600 Last Updated: 09/25/2009 02:01 PM 0 Rating/ Voters

The "IF" condition allows selection of the data output depending on some condition or user-entered parameters. 

Template:

{#ifcond (( expr1 ), ( expr2 ), ( expr3 ))#}

This expression evaluates and prints result of expr2 if expr1 evaluates to TRUE, and expr3 if expr1 evaluates to FALSE.

You can use "==", "<" and ">" symbols in the "expr1" expression.

Left "{#" and right  "#}" delimiters for field names aren't being used inside the "ifcond" operator.

Note:
Spaces must be placed like in the example.

Example:

{#ifcond(( Number1 > Number2 ), ( Number1 + 10 ), ( Number2 ))#}

Let's say we have Number1 = 20 and Number2 = 5. Then Number1 is greater than Number2, expression Number1 > Number2 is TRUE and we print Number1 + 10, equaling 30.

Result:

30