Link Search Menu Expand Document

List.First()

First(list) => Returns the value of the first element in the list
Name Type Description
list List List to find the first value of
First(List('apple', 'banana', 'kiwi')); => 'apple'

List.Last()

Last(list) => Returns the value of the last element in the list
Name Type Description
list List List to find the last value of
Last(List('apple', 'banana', 'kiwi')); => 'kiwi'

List.Count()

Count(list) => Returns the number of elements in the list
Name Type Description
list List List to count the elements in
Count(List('apple', 'banana', 'kiwi')); => 3

List.HasOne()

HasOne(list) =>  Returns true if the list only has one element, false otherwise
Name Type Description
list List List to check if one element
HasOne(List('apple', 'banana', 'kiwi')); => false
HasOne(List('apple')); => true
HasOne(List()); => false

List.Min()

Min(list) => Returns the minimum numeric value in the list, returns null if no values are numeric
Name Type Description
list List List to find min of
Min(List('apple', 'banana', 'kiwi')); => null
Min(List('apple', 'banana', 'kiwi', 5)); => 5
Min(List(32, 8, 4, 99)); => 4

List.Max()

Max(list) => Returns the maximum numeric value in the list, returns null if no values are numeric
Name Type Description
list List List to find max of
Max(List('apple', 'banana', 'kiwi')); => null
Max(List('apple', 'banana', 'kiwi', 5)); => 5
Max(List(32, 8, 4, 99)); => 99

List.Distinct()

Distinc(list) => Returns a list of distinct elements within list
Name Type Description
list List List to get distinct elements of
Distinct(List('apple', 'banana', 'kiwi', 'banana', 'kiwi')); => [apple, banana, kiwi]

List.Filter()

Filter(list, filter) => Returns a list of values that contain the literal passed to the function or meets the conditional operand and value supplied to the function
Name Type Description
list List List to be filtered
filter Text Text filter either containing text to filter on or a conditional to meet
Filter(List(1, 2, 3, 4, 5), '<= 3'); => [1, 2, 3]
Filter(List('apple', 'banana', 'kiwi'), 'a'); => [apple, banana]
Filter(List('John', 'Joe', 'Johann'), 'Joh') => [John, Johann]

List.OrderBy()

OrderBy(list, order?) => Returns list ordered in ascending or descending order. If no order specified a list sorted in ascending order will be returned
Name Type Description
list List List to be sorted
order? ‘ASC’ or ‘DESC’ The order in which to sort the list
OrderBy(List(3, 4, 2, 6)); => [2, 3, 4, 6]
OrderBy(List(3, 4, 2, 6), 'ASC'); => [2, 3, 4, 6]
OrderBy(List(3, 4, 2, 6), 'DESC'); => [6, 4, 3, 2]

List.Reverse()

Revers(list) => Returns list in reverse order
Name Type Description
list List List to be reversed
Reverse(List('abc', 'def', 'ghi')); => [ghi, def, abc]
Reverse(List(1, 4, 3)); => [3, 4, 1]

List.IndexOf()

IndexOf(list, value) => Returns a Number with index of value in list. Returns -1 if value is not in list
Name Type Description
list List List to be searched
value * element to search for index of
IndexOf(List(1, 4, 3), 4); => 1
IndexOf(List('abc', 'def', 'ghi'), 'abc'); => 0
IndexOf(List('abc', 'def', 'ghi'), 4); => -1

List.Join()

Join(list, separator) => Returns a new Text with all items of list joined with separator
Name Type Description
list List List to be joined
separator Text Text used to join each element of the list
Join(List('abc', 'def', 'ghi'), ', '); => 'abc, def, ghi'

List.Where()

Where(list, function) => Returns a list of values that meet the where function
Name Type Description
list List List the where function is applied to
function Function A lambda or function that returns true or false
List.Where(List(1, 2, 3, 4), (i) => {  return i > 2; }; ) => [3, 4]

List.Map()

Map(list, function) => Returns a new list holding the results of list passed through the function
Name Type Description
list List List the function is applied to
function Function A lambda or function that is applied to each item in list
List.Map(List(1, 2, 3), (a) => { return a*2; };) => [2, 4, 6]

List.Range()

Range(start, end) => Returns a list of integers beginning with start and ending with end
Name Type Description
start Number First number of list
end Number Last number of list

Note: Range rounds to the nearest integer

List.Range(1, 3) => [1, 2, 3]
List.Range(1.5, 3.2) => [2, 3]

List.Get()

Get(list, index) => Returns the value at index in list
Name Type Description
list List List to get data from
index Number(Integer) Index of list item to return
List.Get(List(1, 2, 3), 0) => 1

List.Foreach()

Foreach(list, function) => Loops through list and applies function to each item in list. No return value.
Name Type Description
list List List to loop through
function Function Function or lambda to apply to each item in list
var result = 0;
var plustwo = (a) =>  { result = a+2; };
List.Foreach(List(1, 2, 3), plustwo);
return result;

Returns the number 5

List.Reduce()

Reduce(list, startDefault, function) => Reduces a list to one value that is returned based on the input function and startDefault.
Name Type Description
list List List to be reduced
startDefault * Value to use as the starting value when reducing
function Function Function used to reduce the list
List.Reduce(List(1, 2, 3), 0, (a, b) => {return a + b;}) => 6
List.Reduce(List(1, 2, 3), 4, (a, b) => {return a + b;}) => 10
List.Reduce(List('hello', ' ', 'world'), '', (a, b) => { return a + b; }) => 'hello world'