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

Is it possible to Show the latest 10/50/100 items in a gallery?

I have an app that will be adding items to a list, and then this list is connected to a gallery that shows the list items on the homepage of the app this gallery also has a search bar that I made so users can search for specific items. This app is for daily quality checks for our engineers so it will probably fill up quickly with items and I'm learning that there is a limit of 500-2000 items for a gallery, or something like that. I don't need the gallery to show all of the items in the list, but I am curious if its possible to just show the latest 10 or 50 or 100 items so that the app isn't slowed down with too many items. I tried changing the data row limit to 5 but that only shows the first 5 items in the list, or the oldest items in the list, so it would be more helpful if the gallery could show the newest items and then be removed from the gallery after a certain amount of new items are created. Thank you in advance!

1 ACCEPTED SOLUTION

Accepted Solutions
Drrickryp
Super User
Super User

@CorruptZeus 

FirstN(Sort(datasource,ID,Descending), 100)

Will work for very large data sources.

LastN() and Max() are not delegatable.

View solution in original post

3 REPLIES 3
Drrickryp
Super User
Super User

@CorruptZeus 

FirstN(Sort(datasource,ID,Descending), 100)

Will work for very large data sources.

LastN() and Max() are not delegatable.

CorruptZeus
Helper I
Helper I

Thank you! I still have the warning about the search function might not work correctly on large databases, but as far as I'm aware if it's only searching within the newest 100 items there should be no issues, correct?

Drrickryp
Super User
Super User

@CorruptZeus 

You can ignore it.  It is telling you that it will work for up to the last 2000 items. 

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (3,809)