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

The ShowIfHasValue Function

The ShowIfHasValue Function

This function is used mainly to get rid of empty paragraphs in a document.

<<ShowIfHasValue(AddressLine3)>>

will insert the value of the AddressLine3 data element only if that data element has a non-empty value.  If the value IS empty, then the entire paragraph containing the field is removed.

Note that this behaviour applies even when there is other text in the paragraph, and so the function should be used bearing that in mind.

Before this function was introduced, the only other way to achieve the same result would have been to code the following:

<<If(AddressLine3 != '')>>
<<AddressLine3>>
<<End()>>

4 thoughts on “The ShowIfHasValue Function

  1. Hi,

    I am also testing this progrma, and I wonder if this program can make simple algebraical operations in such way that when I fill a line with a number or an amount it may show the result of such algebraical operation in another line.

    Thanks,

    1. Yes, indeed.

      The intervening part of the document between an <<If()>> command and its corresponding <<End()>> command can be (just about) any part of a document – from a few characters to a number of pages or even sections (MSWord sections). If the condition in the <<If()>> command is satisfied, then that intervening part of the document is included in the merged document, whereas if the condition is not satisfied, then the intervening part is excluded.

Leave a Reply