Search

April 24, 2026

BuildList Function

Similar to the List command, BuildList produces a delimited list from a repeating data element. The key difference is that BuildList is a function, which means it can be used inside other commands and expressions, not just as a standalone fillpoint.

 

Syntax

«BuildList(repeat,data_element,separator,delimiter,last_delimiter)»
Parameter Description
repeat The name of the repeating element
data_element The data element within the repeat to list
separator The separator between all items except the last two (use ! before a comma)
delimiter The separator before the second-to-last item
last_delimiter The separator before the last item (e.g. and )
Note: To escape characters, as with the List command, a comma in any delimiter parameter must be prefixed with! because commas are used by XpressDox as parameter delimiters.

 

Basic example

To produce a comma-separated list of party names ending with “and”, the code would look as follows:

«BuildList(Person,Name,!, , and )»

Output: Harry Potter, Juliet Jones and Fred Basset

 

Using expressions with BuildList

Because BuildList is a function, other functions can be applied to it in various ways. You can, for example, wrap a function around the data element inside BuildList:

«BuildList(Person,ToUpper(Name),!, , and )»

Output: HARRY POTTER, JULIET JONES and FRED BASSET

 

Or you can wrap a function around the entire BuildList:

«ToUpper(BuildList(Person,Name,!, , and ))»

Output: HARRY POTTER, JULIET JONES AND FRED BASSET

 

Using BuildList inside other functions

BuildList can also be embedded inside larger expressions, for example inside an IIf or concat:

«IIf(DepartmentDetailsRequired = 'Y',iif(InsuredEntity != '',concat(' the ',InsuredEntity),concat(' the ',BuildList(Department_details,DepartmentName,!, , and ))),ClientFullName)»

In this example, BuildList is called inline as part of a larger expression, only when InsuredEntity is empty. This would not be possible with the List command.

 

 

See related articles: