Edit

ExpandList (listName, expressionText)

Result Type: List

Definition: Only available in Forms.

Returns a list of results obtained from evaluating expressionText in the context of each of the records in the user selection of the list subfile for the list whose name is listName. The result of this function is a list of values and cannot be used in another calculation or printed on the form. You must pass the result of the function to another function that accepts a variable number of parameters, such as Count() or Sum().

Note that although the parameters will be evaluated as expressions, you must pass them to the function as text strings. The ExpandList function itself will evaluate the expressions.

You cannot use this function in a list column calculation.

Examples:  Sum(ExpandList("List1", "Detail.Net"))

returns the sum of the net column of the list named “List1”.

ConcatWith(", ", ExpandList("CustCopy", "Detail.Description"))

returns the a string containing the text from all of the detail lines for the transaction—each one separated by a comma and a space.

See Also:

ExpandDetail: Expand form search result values to a parameter list

SubTotal: Subtotal a form list column