web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Get most recent record...
Power Apps
Unanswered

Get most recent records (into table)

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi all,

 

Flow: forms are filled by different users (data to Sharepoint), the forms are to-be evaluated. Each form 'is valid' for a period of time (specified by the user), for each time-unit in the period a record is created in the Sharepoint.

 

E.g. now = 28-11-2022 11:59:00.000

ID | USER | ENTRYDATE | DATEVALID  | FORMDATA

1  | x        | now             | 01-01-2022 | 123

2  | x        | now             | 01-02-2022 | 123

3  | x        | now             | 01-03-2022 | 123

4  | y        | now             | 01-01-2022 | 321

5  | y        | 01-01-2022 | 01-01-2022 | 434

 

in this example USER `x' filled the form for the first 3 months of 2022; 

`y' filled the form twice for the same period (Januari 2022) on different dates.

 

I would like an overview of the forms in a table, more specifically, I want a table where I can see the most recent record per person that are valid in a specific period, thus, i.e. in the case that I choose Januari 2022, I want to see IDs 1 and 4; in the case that I choose period Januari to March 2022, I want to see IDs 3 and 4.

 

I was thinking of using a GroupBy for the USER, and First(Sort())... in order to get the most recent records *.

 

* Note that I already have some code to sample the records that are valid within some chosen period. Hence, I want the record with the most recent ENTRYDATE per USER.

 

 

AddColumns(
 GroupBy(
 //Piece of code to sample records within a chosen period
 Filter(
 'Vendor Rating', 
 DatePickerStart.SelectedDate <= MonthYear &&
 DatePickerEnd.SelectedDate >= MonthYear &&
 Title = ComboBox2.Selected.Title
 ),
 "USER",
 "data"
 ),
 "blabla",
 First(
 Sort(
 GroupBy(
 Filter(
 'Vendor Rating', 
 DatePickerStart.SelectedDate <= MonthYear &&
 DatePickerEnd.SelectedDate >= MonthYear &&
 Title = ComboBox2.Selected.Title
 ),
 "USER",
 "data"
 ),
 "ENTRYDATE",
 Descending
 )
 )."ENTRYDATE" 
)

 

This is my code so far.. Not working.

Any help would be much appreciated!

 

KR,

Rix

 

(@WarrenBelz, do you perhaps have a clue how to tackle this one?)

Categories:

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 397 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 354

#3
WarrenBelz Profile Picture

WarrenBelz 232 Most Valuable Professional

Last 30 days Overall leaderboard