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

The ValueIsEmpty Function

Normally, the following test would result in “Yes it is empty” if the value of Name were an empty string:

«If(Name = '')»Yes it is empty«Else()»No it is not empty«End()»

However, in situations where the XML data to be used in the template are sourced not from the interview, but from, for example, a data source, then it might be that the data element Name does not even exist in the data set.

In a situation like this, the fillpoint «Name» will result in an empty string being inserted into the merged document, but (because of XML rules) the test Name = '' does NOT evaluate as true, and so the above If/Else construct would render “No it is not empty”.

This is where the ValueIsEmpty function is useful – where there is a possibility that the data element may or may not exist, then the following construct should be used instead of that at the start of this article:

«If(ValueIsEmpty(Name))»Yes it is empty«Else()»No it is not empty«End()»

Leave a Reply