FORMULA LANGUAGE


Working with lists
Example

A list is a named entity that can contain multiple values of the same type. Lists occur as follows:


Lists provide limited iteration because a list operation applies the operation to each element of the list, like processing an array in a loop.

The following @functions deal specifically with lists.
FunctionDescription
@CompareCompares two lists pair-wise.
@Count(list)Determines the number of elements in a list, returning 1 if the value it is evaluating is a null string or not a list.
@Elements(list)Determines the number of elements in a list, returning 0 if the value it is evaluating is a null string or not a list.
@Explode(string)Converts a text string into a text list. Spaces, commas, semicolons, and newlines separate elements in the string.
@Explode(string ; separators)Converts a text string into a text list; the second parameter specifies the separators (except newlines) for elements in the string.
@Explode(string ; separators ; includeEmpties)Converts a text string into a text list; @True as the third parameter includes empty list elements where consecutive separators occur.
@Explode(string ; separators ; includeEmpties ; newlineAsSeparator)Converts a text string into a text list; @False as the fourth parameter excludes newlines as separators.
@Explode(dateRange)Converts a date range into a list of dates. The argument must be a time-date value; the return value is a text list.
@Implode(list)Converts a text list to a text string, using spaces to separate elements.
@Implode(list ; separator)As above, but the second parameter specifies the separator for elements in the string.
@IsMember(string ; list)Determines if a string is a member of a list. Returns True (1) or False (0).
@IsMember(list1; list2)Determines if a list is contained in another list. Returns True (1) or False (0).
@IsNotMember(string ; list)Determines if a string is not a member of a list. Returns True (1) or False (0).
@IsNotMember(list1; list2)Determines if a list is not contained in another list. Returns True (1) or False (0).
@Keywords(list1; list2)Locates words in list1 that match words in list2. Word separators are " , ? ! ; : [ ] { } < >
@Keywords(list1; list2; separator)As above, but the second parameter specifies the word separators.
@Max (number or numberlist)Returns the largest number in the list.
@Max (number or numberlist ; number or numberlist)Returns the larger number of two numbers or a number list of the largest numbers resulting from a pair-wise computation of two number lists.
@Member(value ; list)Determines the position of a value in a string list.
@Min (number or numberlist)Returns the smallest number in the list.
@Min (number or numberlist ; number or numberlist)Returns the smaller number of two numbers or a number list of the smallest numbers resulting from a pair-wise computation of two number lists.
@NothingAdds nothing to a transformed list.
@Replace(list1; list2; list3)Replaces values in list1 that match values in list2 with the corresponding values in list3.
@Sort( list ; [order] )Sorts a list. Order is [Ascending] (default) or [Descending].
@Subset(list ; n)Extracts n number of values from the list. Use -n to extract right to left.
@Transform(list ; name ; formula)Applies a formula to each element of a list.
@Unique(list)Removes duplicate values from a string list.
@UniqueReturns a random, unique text value.

Example
See Also