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 IsTrue Function


The IsTrue Function

When an XML dataset is sourced from a data source, or perhaps from an XML text file which has been populated by user input, it is not always easy to determine beforehand what the format of some data elements will be.  This applies particularly to true/false options which in various scenarios might have values “True”, “true”, “Yes”, “Y” or “1” for a true value.

The IsTrue function will help to address this.  Instead of saying something like:

«If(Option = ‘True’ or Option = ‘true’ or Option = ‘1’ or Option = ‘Yes’ or Option = ‘YES’ or Option = ‘Y’ or Option = ‘y’)»output some text«End()»

you can now write it using the following shorthand

«If(IsTrue(Option))»output some text«End()»

The function is case-insensitive, and so will accept “trUE”, “tRuE”, “yES”, etc. as true values.

The IsFalse() function is equivalent to not(IsTrue()).