cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Farquad88
Helper I
Helper I

Filter gallery to show only most recent record by title

I have multiple entries with the same title in a sharepoint list, there is an entry made for updates each week. In a gallery, I'd like to show the Title and the last date it was updated.

 

For Example, the data:

 

Title | Created

A      | 3/14/2021

B       | 3/14/2021

C       | 3/14/2021 

A       | 3/20/2021

C       | 3/20/2021

 

 

I would want it to show: (the order it displays does not really matter)

B       | 3/14/2021

A       | 3/20/2021

C       | 3/20/2021

 

I do not want to put date parameters on the gallery, this is intended to show when something has/has not been updated 

 

 

Also - this does not necessarily need to be in a gallery, if there is an easier way to display each title and its most recent record.

1 ACCEPTED SOLUTION

Accepted Solutions
Anonymous
Not applicable

Failing all else there is this crazy method:

HenryARPhillips_0-1616099002690.png

 

HenryARPhillips_2-1616099185322.png

Click the button again and

HenryARPhillips_3-1616099238645.png

 

You could probably sort by the SP List Item Id too.

 

Like I say the above feels a bit naff but it does seem to work and of course you can choose where and how you instigate such logic. Or just smile and wave and safely ignore 😊

 

 

View solution in original post

6 REPLIES 6
Anonymous
Not applicable

Failing all else there is this crazy method:

HenryARPhillips_0-1616099002690.png

 

HenryARPhillips_2-1616099185322.png

Click the button again and

HenryARPhillips_3-1616099238645.png

 

You could probably sort by the SP List Item Id too.

 

Like I say the above feels a bit naff but it does seem to work and of course you can choose where and how you instigate such logic. Or just smile and wave and safely ignore 😊

 

 

Thanks, I'm relatively new to powerapps, would i be able to put this inside of the onstart for the page this is on, instead of a button?

Anonymous
Not applicable

Hi, you sure could if it only needs to be populated once on the loading of the app.

 

You could go a bit deeper and do it in the on visible of the screen housing the gallery

 

And maybe with one of the above two method to initially populate, I like to use the recycling style icon that looks like a refresh button, so that you can then refresh whilst in the app if needs be.

 

I mean to be honest one of the beauties of Power Apps, is try and see what works

Farquad88
Helper I
Helper I

Agreed! Thanks for the suggestion, I'm going to give it a try! 

 

My page will only have ~6 things updating on a weekly basis, so having it refresh on start will be enough.

@Anonymous  One follow up, it doesnt seem to be applying this to my gallery. 

do I need to put the variable in my gallery's items property? OR what should be in the items property?

 

edit: It is filtering out the titles, so I have 1 A, B, & C. However, I am getting an error in the date section of the gallery.

Anonymous
Not applicable

Hi,

 

So in my example, if you have taken it literally. I am just using the Collection for the Items of the Gallery, so:

HenryARPhillips_0-1616103153682.png

 

In terms of what info you want to display in the gallery, just go to the template/top entry and ensure it is thisitem.respectivecolumn name, so for me as I was just using the default created column I have the following:

 

HenryARPhillips_1-1616103236747.png

 

HenryARPhillips_2-1616103252032.png

 

So if you column is different, just change what is after thisitem.

Helpful resources

Announcements
Super User 2 - 2022 Congratulations 768x460.png

Welcome Super Users

The Super User program for 2022 - Season 2 has kicked off!

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

<
Users online (2,588)