List Functions

Calculated Attribute expressions can be written using the following available functions. Use Cases follow the available functions table.

Function

Parameters

Description

FILTER

(list, expression)

Returns a list with the elements of ‘list’ where ‘expression’ evaluates to true.

The 'index', 'item', and 'size' variables are also available. For more information, refer to the Special Variable Functions section of the Variable Functions documentation here.

INDEX

 

The 'index' special variable is available for use within all ITERATE and FILTER functions. For more information, refer to the Special Variable Functions section of the Variable Functions documentation here.

ITEM

 

The 'item' special variable is available for use within all ITERATE and FILTER functions. For more information, refer to the Special Variable Functions section of the Variable Functions documentation here.

ITERATE

(list, expression)

Returns a list where the elements of ‘list’ are applied to ‘expression’. Iterate allows data to be pulled from an object other than the current object, even if the list created is only a single object.

The 'index', 'item', and 'size' variables are also available. For more information, refer to the Special Variable Functions section of the Variable Functions documentation here.

LIST

(list, separator[, last-separator])

Returns text with all the elements of ‘list’. The elements are separated by the text ‘separator’.

[last-separator] is optional and controls the last separator.

LIST2MULTIVALUE

(list)

Returns multi-valued text, where the values equal the elements in the ‘list’.

LISTCONCATENATE

(list1, list2, ...)

Returns a list with the elements of all the supplied lists. The order of the elements in the resulting list is: the elements of list1, elements of list2, etc.

LISTCONTAINS

(list, text)

Returns 1 (=TRUE) if ‘list’ contains the element ‘text’; otherwise returns 0 (=FALSE).

LISTITEM

(list, indexno)

Returns the item identified by ‘indexno’ in ‘list’. The index number of the first element is 1.

LISTLEN

(list)

Returns the number of elements in ‘list’.

MULTIVALUE2LIST

(text)

Returns a list where the elements equal the values in the multi-valued ‘text’.

RANGE

(list, separator [, separator-between-ranges[, sorted-valued-list]])

Returns text representing the ranges in ‘list’.

[separator-between-ranges] and [sorted-valued-list] are optional.

REVERSE

(list)

Returns a list with the elements of ‘list’ in reverse order.

SIZE

 

The 'size' special variable is available for use within all ITERATE and FILTER functions. For more information, refer to the Special Variable Functions section of the Variable Functions documentation here.

Note: The LISTLEN function provides the same results and is easier to use.

SORT

(list)

Returns ‘list’ sorted.

Note: No locale sorting is supported. All sorting is done in LATIN1 character set, which means that Unicode characters are not sorted correctly.

SORTNUMERIC

(list)

Returns ‘list’ sorted numerically.

UNIQUE

(list)

Returns list where duplicates in ‘list’ are removed.

Use Cases

For examples of these functions, refer to List Examples here.

For a scenario using the LISTLEN and LISTITEM functions, refer to Comparing Localized Values Scenario here.

For a scenario using the LISTLEN function, refer to Identifying Child Objects Scenario here.

For a scenario using the FILTER, ITERATE, and LISTITEM functions, refer to Including Parent Info on Child Scenario here.

For a scenario using the LISTLEN function, refer to New Product Indicator Scenario here.

For a scenario using the FILTER and ITERATE functions, refer to Product Description Scenario here.

For a scenario using the ITERATE function, refer to Reference Scenario here.

For a scenario using the ITERATE and LISTITEM functions, refer to Total Cost of Materials Scenario here.