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 / I am trying to show on...
Power Apps
Unanswered

I am trying to show one recent record per quotenumber in the browsegallery

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi I am trying to display the record for the last id per quotenumber in the browse gallery. I tried using max id but I keep getting just one record to populate. using this syntax
Table name: quotedata
SortByColumns(Search(Filter(quotedata,Last(Sort(quotedata,id,Ascending)).id=id,quotenumber),TextSearchBox1.Text, "customername","customerno","shiptoname","shiptocode","id"),"quotenumber", If(SortDescending1, Ascending,Descending)) 

Here's the data

idquotenumbercustomernocustomernameshiptonameservicecontractsizedateaddeddatemodifieduser
120-10-0114470001447 AMERICAN REALTY MGT-ALBANESEGARDEN CENTER CITY ASSOCIATESCoil Cleaning$5,00010/20/2020 4:00 Ola Akinruli
220-10-0215740001574 BOSTON UNIVERSITY MEDICAL CAMPBOSTON UNIV. SCHOOL OF MED. STOUCoil Cleaning$50010/27/2020 4:00 Ola Akinruli
320-10-0215740001574 BOSTON UNIVERSITY MEDICAL CAMPBOSTON UNIV. SCHOOL OF MED. STOUCoil Cleaning$5,00010/27/2020 4:0010/27/2020 4:00Ola Akinruli
420-10-0215740001574 BOSTON UNIVERSITY MEDICAL CAMPGREGG JACOBSON JACOCoil Cleaning$5,00010/27/2020 4:0010/27/2020 4:00Ola Akinruli
520-10-0114470001447 AMERICAN REALTY MGT-ALBANESEGARDEN CENTER CITY ASSOCIATES 1050Coil Cleaning$5,00010/27/2020 4:0010/27/2020 4:00Ola Akinruli
620-10-0212610001261 HARRY GRODSKY COMPANYHARRY GRODSKY COMPANY BOEHDomestic Water Tank Cleaning$9,00010/27/2020 4:00 Ola Akinruli
720-10-0316030001603 BROWN PRINTINGBROWN PRINTING GRAVLegionella Testing $34,00010/27/2020 4:00 Ola Akinruli
820-10-0316030001603 BROWN PRINTINGBROWN PRINTING GRAVLegionella Testing $34,00010/27/2020 4:0010/27/2020 4:00Ola Akinruli
920-10-0215740001574 BOSTON UNIVERSITY MEDICAL CAMPtestCoil Cleaning$34,00010/27/2020 4:0010/27/2020 4:00
  • Ola Akinruli

 

Categories:
I have the same question (0)
  • rsaikrishna Profile Picture
    3,703 on at

    @Anonymous 

     

    Check the following post:

    https://powerusers.microsoft.com/t5/Building-Power-Apps/Gallery-Filter-for-the-most-recent-records-for-given-ID/m-p/696253

     

    I hope it will give you some clue to work on. 

     

    GroupBy and Sort functions will help you to achieve what you need.

     

    Regards

    Krishna Rachakonda

    If this reply helped you to solve the issue, please mark the post as Accepted SolutionMarking this post as Accepted Solution, will help many other users to use this post to solve same or similar issue without re-posting the issue in the group. Saves a lot of time for everyone.
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thank you so much for the tip @rsaikrishna  It worked. Only issue I have now is when I select a record from the browsegallery, it takes me to a blank Detailed Screen. 

    Oakinruli_0-1603950523248.png

    Script for the browsegallery

    Search(AddColumns(GroupBy(quotedata, "customername","customerno","quote","shiptoname","GroupByquotenum"),"id", First(Sort(GroupByquotenum,id,Descending)).id),TextSearchBox1.Text, "customername","customerno","shiptoname","quote")

    Oakinruli_1-1603950624016.png

    Blank details screen

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 396 Most Valuable Professional

#2
11manish Profile Picture

11manish 134 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 101 Super User 2026 Season 2

Last 30 days Overall leaderboard