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

The Ordinal Command

The Ordinal Command

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:

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 party is Ivan Bosman.
The fourth party is Maximilian Jones.
The fifth party is Johan Smit.
The sixth party is William Wilberforce.
The subsequent party is Mortimer Rodent.
The subsequent party is Petrus du Toit.

Notice how when there are more repeated items than the arguments to the Ordinal command cater for (in the above there are 7 arguments but 8 repeated items), then the last argument is used for the excess items.

In the case of only one party in the list, this would read:

The only party is Fred Basset.

If the Ordinal command above were coded as

<<Ordinal(,first ,second ,third ,fourth ,fifth ,sixth ,subsequent )>>

In other words, the first parameter to the command is empty, then in the case of only one party in the list, it would then read:

The party is Fred Basset.

To make sure the seventh and eighth parties are correctly numbered, the Ordinal command could be coded as <<Ordinal(only ,first ,second ,third ,fourth ,fifth ,sixth ,seventh ,eighth ,ninth ,tenth ,subsequent )>>

Leave a Reply