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 / Collect from SharePoin...
Power Apps
Answered

Collect from SharePoint List and Filter

(0) ShareShare
ReportReport
Posted on by 27

Hey everyone. I am having an issue with something that I thought I had correct but once my SharePoint (SP) list went past 2000 entries it turned out I do not have figured out.  So here is what I currently have:

 

ClearCollect(AllMyData,Filter('Daily Summary',Lower('Created By'.Email)=Lower(User().Email)))

 

Basically, in my gallery i want to data to filter to the current user that is logged in.  Simple enough, or so I thought.  I also had, on the app load event, a variable that was the user().Email and I used that in the collect formula but when I did (at least in testing) nothing was returned, which is why it is still User().Email - the lower is just a little catch for people's name's with random capitalization.

Can anyone shed some light on this delegation issue i am having? 

 

Categories:
I have the same question (0)
  • mdevaney Profile Picture
    29,991 Moderator on at

    @McG 

    The LOWER function cannot be delegated.  It is likely the source of your delegation problems.  You will have to remove lower for your formula to be delegable.

     

    Here's a chart showing all the functions that can currently be delegated in SharePoint.

     

    Untitled.png 

     

    ---
    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."

  • Verified answer
    WarrenBelz Profile Picture
    156,371 Most Valuable Professional on at

    Hi @McG ,

    Yes - 'Created By' is not Delegable, neither is User().Email. There is a workaround for the second with a Variable, but you would have to store the first in another text field when a record is created. Also Lower() is not, but this can also be solved.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

  • McG Profile Picture
    27 on at

    Can you elaborate a little further? "...store the first in another text field when a record is created" is above my current knowledge level (or I ma just tired and am missing something quite simple).

     

    I can move from "Created By" to just using the User name (it is a choice field on SP).  I can use the office365users to get this info.  Does what I had used for my variable (the app OnStart event) work the way I thought it would? Pass a value to it, and on my collect use this variable to filter the data? 

     

    Any additional help on this is greatly appreciated.  

  • WarrenBelz Profile Picture
    156,371 Most Valuable Professional on at

    Hi @McG ,

    Firstly, this document is essential reading in PowerApps to understand and manage Delegation.

    To put it as briefly as possible, there are some tasks that the SharePoint shared service will not do and simply returns the first 500 (or 2000 maximum if you have this set) for the app to sort out. This means that any non-Delegable query will not work properly on record sets over this limit.

    The workarounds I was referring to were firstly - set a Variable at App OnStart

    Set(vUserName,User().FullName);
    Set(vUserName,Lower(vUserName))

    You can do the same for email (User().Email) and will get you a Variable set to the Lower case of the relevant item. This can then be used without Delegation issues as the information is "local" and a server call is not required each time it is compared with something. You may not want to use the Lower() bit however if the target is Proper Case.

    The next bit is that 'Created By' is not Delegable. You can do a workaround (I call it Data Management) for this (and many other things) with "shadow" text or numeric fields set to Default to the value. 'Created By' is quite easy - just set it to vUserName as above and then you have a text field you can query on.

    Does this all make sense to you now?

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

     

     

     

     

  • WarrenBelz Profile Picture
    156,371 Most Valuable Professional on at

    Hi @McG ,

    Just checking if you got the result you were looking for on this thread. Happy to help further if not.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

  • McG Profile Picture
    27 on at

    Hey @WarrenBelz ,  thanks for checking in.  I have taken a few days off from work but from what I have read from what you have posted I think it all makes a little sense.  I will look to implement a solution tomorrow when I back in front of my computer.  I will update then.  Thanks again for following up.  

  • McG Profile Picture
    27 on at

    I have repaired the app to make it work beyond the 2000 limit.  My question is how do I test the app before publishing it, as under the App OnStart, where I set my CurrentUser, does not seem to work in the Preview App.  It does work when I publish it.  I'd rather not mess around with deploying an app that has not been tested.  Any pointers on this last little nugget of my issue?   Besides that, I am very grateful for your help and shared knowledge with my issue.  Thank you. 

  • Verified answer
    WarrenBelz Profile Picture
    156,371 Most Valuable Professional on at

    Hi @McG ,

    To answer your questions firstly you can run App OnStart in Design view

    AppOnStartRun.jpg

     

     

     

     

     

    Your CurrentUser can be set here as well as anything else you need to do.

    Set(
     CurrentUser,
     User().FullName
    )

     

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 429 Most Valuable Professional

#2
11manish Profile Picture

11manish 191 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 122 Super User 2026 Season 2

Last 30 days Overall leaderboard