ListTake Function
The ListTake function can be used to reduce a list to a specified number of elements.
Description:
Returns a list containing the specified number of elements from the beginning of the input list. If the specified number exceeds the total number of elements, the result will be the original list.
Returns:
Any*
Parameter:
Parameter | Data Type | Description |
|---|---|---|
1 | Any* | The list. |
2 | Whole number | Number of elements that will be returned from the beginning of the input list. |
Examples:
When using functions inside a field, remember the field brackets:
{ListTake(ClientName, 1)}
Expression | Result |
|---|---|
ListTake( List("a","b","c"), 1 ) | List("a") |
ListTake( List("a","b","c"), 2 ) | List("a","b") |
ListTake( List("Jane","Smith"), 1 ) | List("Jane") |
ListTake( List("Jane","Smith"), 9 ) | List("Jane","Smith") |