List.Last

About

Returns the last set of items in the list by specifying how many items to return or a qualifying condition provided by countOrCondition.

Syntax

List.Last(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.

Remarks

  • If a number is specified, up to that many items are returned.

  • If a condition is specified, all items are returned that initially meet the condition. Once an item fails the condition, no further items are considered.

Examples

List.Last({1, 2, 3}) equals 3