ForEach

The Ordinal Command

April 18, 2011 Help

Ordinal is used within a ForEach to output the ordinal value (that is, ‘first’, ‘second’, etc.) of the position in the list of the current item: <<ForEach(party)>> The <<Ordinal(only ,first ,second ,third ,fourth ,fifth ,sixth ,subsequent )>>party is <<firstnames surname>>. <<End(ForEach party)>> This would result in something like this: The first party is Fred Basset. The second party is Harry Smith. The third [...]

Read the full article →

Working with repeated elements – Part 2

June 28, 2010 XpressDox Cookbook
Thumbnail image for Working with repeated elements – Part 2

A common issue with repeating data is the requirement to refer to the items within the list by their ordinal values.

Read the full article →

ForEach, List, Ordinal: Handling repeating data

October 10, 2009 User Reference
Thumbnail image for ForEach, List, Ordinal: Handling repeating data

The central issue with repeating data is that the number of repeated data elements is not known at the time the template is authored, and so XpressDox offers the ForEach, List and Ordinal commands as a way of processing a variable number of repeated data elements.

Read the full article →

Working with repeated elements – Part 1

October 1, 2009 XpressDox Cookbook
Thumbnail image for Working with repeated elements – Part 1

Repeating data elements presents a challenge to the template author, especially in formulating sentences and descriptions where the number of parties or invoice items or other repeating data is unknown at the time of authoring the template. This recipe in the Cookbook demonstrates how XpressDox meets this challenge.

Read the full article →

The Count Function

October 1, 2009 User Reference

Count This command can be used in the context of a <<ForEach()>> command to return the number of repeated items. <<ForEach(Child)>> <<Child_Name>> <<End()>> Number of children: <<count(Child)>> Conditions may be added to the <<Count>> command, as illustrated below: <<ForEach(Child)>> <<Child_Name>>, (Age <<Age>>) <<End()>> Number of children 12 years or older: <<Count(Child[Age >= 12])>>

Read the full article →

The List Command

October 1, 2009 Help

List. The <<List>>() command is a way of listing the names of parties is all in one phrase, with a comma separating each pair of names except for the last two which are separated by the word ‘and’. This is what the <<List>>() command does and might look like this: The parties are: <<List(parties,firstnames surname,!, [...]

Read the full article →

Using block commands in XpressDox

September 30, 2009 User Reference
Thumbnail image for Using block commands in XpressDox

The ForEach and If commands are called ‘block commands’ because they are terminated with a separate End command. Between the start and end of the block there are other Merge Fields. There is a special behaviour related to block commands to help with eliminating unwanted empty paragraphs when the start and end appear on different paragraphs.

Read the full article →