Conditional and Loop Control Commands

The conditional commands $if, $ife, $ifn, $ifne, $else, $elseif and $endif may be used in any command files and also in legacy ASCII cover sheet templates (CVR files).

All the commands in this section can also be used for the Conditional Text feature, in HTML job document files, e-mail attachments and body text files, and in ASCII files being converted to TIF.  See the linked topic for more information.

The use of these commands in command files other than infobox (IIF) files is not recommended:

When used in a USR or UJP file, the condition will be evaluated on loading from disk into the cache, and not before each call: so conditions should only refer to global items that do not change while CopiaFacts is running.

When used in an FS file, the condition will be evaluated when the FS file is first loaded, and will not be retained when the file is written back for a retry or after completion of all attempts.

When used in FAXFACTS.CFG, the variables used in condition statements are limited to those defined earlier in the file, a few system variables, and environment variables.

The conditions are ignored in almost all CopiaFacts programs other than the main faxing engine (COPIAFACTS).  An exception is Conditional Text when used other than in the COPIAFACTS engine.

Despite these restrictions the use of conditionals in files other than IIF files can sometimes be useful. But care is required.

The loop control commands $repeat, $break and $until are only available in infobox [IIF] command files, and in 'conditional text'.