Showing results for 
Search instead for 
Did you mean: 
Not applicable

Filter On data source connection

Hi all,


I am trying to connect to a SharePoint list and filter by user()

Filter('Active Field Leadership', 'Performed By'.Email=User().Email)


I previously had it wrapped in a Sort by columns  function

SortByColumns(Filter('Active Field Leadership', 'Performed By'.Email=User().Email), "Date", SortOrder.Descending)


i have been using a filter() query in my browse screen, but I think it has maxed out on the number of entries in the list.

How can I create a connection to the list that only pulls the list items of the user, rather than pulling all items and trying to filter?


Hi @Anonymous 
The Filter query, looks for the records matching the condition  provided and only fetches those records which satisfies it rather than pulling all the records. 
What is the approximate total number of records associated with each user in the sharepoint list? Can you please share more details, so that we can help you better.
Not applicable

Probably around 10-20 per user at the moment, but we have around 150 users. I have this in the browse gallery at the moment. Is there a better place to use this function?
It looks as if it is pulling older records, but not the newest ones.

Hi @Anonymous 


Can you try this: Refresh the data source using Refresh(<<DataSource>>) and sort the returned results based on Last Modified attibute to get the newly created ones?
Not applicable

I tried using refresh() in two places

- App -> Action -> On start

- BrowseGallery1 -> Data -> Items (as part of my existing query above )


Taking ages to load and still only getting older items.

I checked and my ahrepoint list currently has 891 entries.


Any other ideas, or should I try the refresh somewhere else?

Hi @Anonymous , 


Kindly check that the Data Row limit for Non-Delegable queries is set to 2000, this is the max value that can be entered by the user and works upto 2000 records out of all using the Filter query. The soft limit is 500 which can be updated to 2000 records.



Navigate to File -> App Settings -> Advanced Settings -> Look for Data Row limit for Non-Delegable queries


Hope this helps!

Not applicable

Yes, I have tried this. It will give me my 17 current list items, but what happens when the full list exceeds 2000.

Hi @Anonymous , 


In that case you can use collections: 


If you more than 2000 records and want to use a local collection then follow below steps:

a) We will use the ID field to get the records

b) create a collection to store the number of loop count:

ClearCollect(LoopCount,FirstN([0, 2000, 4000, 6000, 8000, 10000],RoundUp(First(Sort(<<YourSPList>>,ID,Descending)).ID/2000,0)));

c) Now work on the main collection to get all the data, this can be done through OnVisible property of the page.


ForAll(LoopCount,Collect(ListItems,Filter(<<Sp LIST>>,ID> Value)));

d) Once all the data is inside the collection, filter out the gallery items based on the collection created using the same formula rather than referring to the data source directly.


Hope this Helps!

Not applicable

Ok, I have tried this in

-> App ->Action ->On Start

AND ->BrowseGallery1->Action->OnVisable


ClearCollect(LoopCount,FirstN([0,2000,4000,6000,8000,10000],RoundUp(First(Sort('Active Field Leadership',ID,Descending)).ID/2000,0)));


ForAll(LoopCount,Collect(ListItems,Filter('Active Field Leadership','Performed By'.Email=User().Email)))


All I get is collections with no records...what am doing wrong?

Hi @Anonymous 


This might be beacause you removed the condition for looping. 
What data are you getting inside the LoopCount collection?
ClearCollect(LoopCount,FirstN([0,2000,4000,6000,8000,10000],RoundUp(First(Sort('Active Field Leadership',ID,Descending)).ID/2000,0)));
ForAll(LoopCount,Collect(ListItems,Filter('Active Field Leadership','Performed By'.Email=User().Email && ID > Value)))
Also, do a right click on the App Start and select run AppStart. I am assuming you have increased the soft limit of 500 to 2000 in the App Settings as mentioned in my previous responses. 
Hope this Helps!

Helpful resources

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!

Users online (5,979)