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 RepeatWhile Command

The RepeatWhile Command

Repeating information which is not in the form of repeating data in XML (i.e. multiple same-named XML elements) can be handled using the RepeatWhile command.

An example of the kind of repeating data that would need a RepeatWhile would be a data element that contains a comma-delimited list of directors of a company.  If the requirement is to list the directors each on their own line, then the following code would achieve this:

«SetVr(‘List’,concat(Directors,‘,’))»«Comment(make sure there’s a trailing comma otherwise the last substring-before doesn’t work)»

«RepeatWhile(GetV(‘List’) != ‘’)»

«substring-before(GetV(‘List’),‘,’)»«Comment(this inserts the name at the front of the list into the merged document)»

«SetVr(‘List’,substring-after(GetV(‘List’),‘,’))»«Comment(removes the name at the front of the list)»


Note that this feature is available only in Version 4 and later of XpressDox.

Leave a Reply