Use Google to find help fast. For example, search on "xpressdox choosefromlist".

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.