List.First

About

Returns the first value of the list or the specified default if empty. Returns the first item in the list, or the optional default value, if the list is empty. If the list is empty and a default value is not specified, the function returns.

Syntax

List.First(list as list, optional defaultValue as any) as any  

Arguments

Argument Description
list The List to check.
optional defaultValue Default value if list is empty.

Examples

List.First({1, 2, 3}) equals 1  
List.First({}) equals null