cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
TorreyFalconer Helper III
Helper III

SP View threshold- how to view most recent

Hi all, 

I have a list that is hitting capacity due to the SP list being too long, I am ok with it only showing 500 items, but it has to be the most recent items. Can you tell me what I should add to my expression in order to achieve this?

 

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: SP View threshold- how to view most recent

@TorreyFalconer
Good to hear you’ve already done that stuff. Getting the last 500 rows won’t be a problem at all 🙂

Use this code. It will work because SORT can be delegated.

FirstN(Sort(your_datasource_name, ID, Descending),500)

—-
Please Accept as Solution if this post answered your question so others may find it more quickly. If you found this post helpful consider giving it a Thumbs Up.

View solution in original post

3 REPLIES 3
Highlighted
Super User
Super User

Re: SP View threshold- how to view most recent

@TorreyFalconer 

You are likely encountering what's called the "delegation limit".  It happens when you use certain functions or data types (see link below) and limits the viewable rows to 500.

 

The simplest way around this is you can increase the delegation row limit to 2000 rows by going the menu:  File > Advanced Settings > Delegation Row Limit.

 

Another option is to write the formula including only functions that can be delegated.  Either way is fine.

 

More info on delegation:

https://powerapps.microsoft.com/en-us/blog/sharepoint-delegation-improvements/

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

TorreyFalconer Helper III
Helper III

Re: SP View threshold- how to view most recent

@mdevaney sorry that really didn't answer my question. I actually did that part, I just need help with how to have it populate the last 500 items in the SP list rather than the first.

Super User
Super User

Re: SP View threshold- how to view most recent

@TorreyFalconer
Good to hear you’ve already done that stuff. Getting the last 500 rows won’t be a problem at all 🙂

Use this code. It will work because SORT can be delegated.

FirstN(Sort(your_datasource_name, ID, Descending),500)

—-
Please Accept as Solution if this post answered your question so others may find it more quickly. If you found this post helpful consider giving it a Thumbs Up.

View solution in original post

Helpful resources

Announcements
MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Apps Community!

Top Solution Authors
Top Kudoed Authors
Users online (7,007)