Table of contents
TOC
Collapse the table of content
Expand the table of content

List.LastN

Owen Duncan|Last Updated: 10/5/2018
|
1 Contributor

About

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

List.LastN(list as list, optional countOrCondition as any) as any  

Arguments

ArgumentDescription
listThe List to check.
optional countOrConditionNumber items to return or a qualifying condition.

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

Example

List.LastN({3, 4, 5, -1, 7, 8, 2},1) equals  { 2 }  
© 2018 Microsoft