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

Test for Any or All repeated items meeting criteria

Test for Any or All repeated items meeting criteria

Suppose you are preparing a template for a Will, where various provisions need to be made for the children of the testator.  The children will then be represented on the template as a repeating item, and in various parts of the template, tests would be made to determine whether any or all of the children meet the necessary criteria.

Somewhere in the template the children would be listed, perhaps like this:

The children are:
Name: «Name»
Gender: «Gender»
Age: «Age»

You may then have a paragraph in the Will which needs to be included only if any (or in other words least one) of the children is a minor (i.e. age less than 18).  The test for “Any” would look like this:

«If(count(Child[Age < 18]) > 0»
The minor children must be blah blah …

Another paragraph is required only if ALL the children are minors.  This test would look like this:

«If(count(Child[Age < 18]) = count(Child))»
blah …

See the Cookbook article Working with repeated elements for more information on repeated data elements.

Leave a Reply