cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ZePowerDiver
Level 8

Accessing a specific record by position

Maybe it's just so obvious that I can't find the way, but is there a way to access a specific row within a collection, table or gallery.. not with First, Lookup/Search, etc.

Let's say I want to hot "row 5".

Is it just me or there's no clean way to do it?

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Accessing a specific record by position

Hi @ZePowerDiver 

To access a specific record by position, we can use the Last/FirstN technique.

The formula would look something like this:

 

Last(FirstN(YourCollection,5))

The FirstN function would return the first 5 rows, and the Last function would then retrieve the 5th row. You can wrap YourCollection inside a call to SortByColumns to implement a specific sort sequence.

 

 

View solution in original post

2 REPLIES 2
Super User
Super User

Re: Accessing a specific record by position

Hi @ZePowerDiver 

To access a specific record by position, we can use the Last/FirstN technique.

The formula would look something like this:

 

Last(FirstN(YourCollection,5))

The FirstN function would return the first 5 rows, and the Last function would then retrieve the 5th row. You can wrap YourCollection inside a call to SortByColumns to implement a specific sort sequence.

 

 

View solution in original post

ZePowerDiver
Level 8

Re: Accessing a specific record by position

cool trick, thanks Tim!

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (4,844)