XpressDox Help Center

Use Google To Find Help Fast, e.g. xpressdox choosefromlist


Press Getting Started in the XpressDox toolbar for basic template development
Watch the tutorial videos
View command help from list of commands
Press F1 for help on a command in the Command Editor
Email support@xpressdox.com for assistance

The IIf Function


The IIf Function

This function is a kind of short cut to writing «If()»«Else()»  … «End()» in certain circumstances.

Suppose you want to write something like

The amount of VAT applicable is ….

Where the …. above is either zero, if no VAT is applicable, or is Amount * VatPercentage div 100.

Using IIf you would write:

The amount of VAT applicable is «IIf((VatApplicable = 'Yes'),FormatAmount(Amount * VatPercentage div 100),'0.00')».

Using the If command that would be

The amount of VAT applicable is «If((VatApplicable = 'Yes')»«FormatAmount(Amount * VatPercentage div 100)»«Else()»0.00«End()».

This function gets its name from the Basic language function which operates in a similar fashion.