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 / Filtered List Not all ...
Power Apps
Unanswered

Filtered List Not all results returned.

(0) ShareShare
ReportReport
Posted on by 68

Hello All,

 

Perhaps someone can shed some light on this. I have a SharePoint list which i query.

 

I am filtering on two of the columns in the list. Column type is  Person or Group 

 

I using the following to filter results:

 

 

Sort(Filter(SiteRegistry, (User().Email in PPCustPrimarySiteOwner.Email) Or (User().Email in PPCustSecondarySiteOwner.Email)), Created, Ascending)

 

 

 

The results are displayed in a Gallery.  Unfortunately not all results are returned.

 

So in one particular example I have a user who is an owner of two sites but only one of them is returned. In my own case I am returned 11 items when the number should be 65 items.

 

I am getting a Delegation Warning so clearly this may be the issue but what changes do i need to make to my filter to address this ?

 

Many Thanks 

Darren

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    156,051 Most Valuable Professional on at

    Hi @marsdendd ,

    I suspect that is because of two things

    • User().Email is not a delegable query
    • In is not a delegable filter, but if you have an exact match, StartsWith will do the same job

    and only the first xxx (500 standard and up to 2000) records are returned.

    So - set a variable at App OnStart

    Set(vUserMail:User().Email)

    Now your code can be

    Sort(
     Filter(
     SiteRegistry, StartsWith(PPCustPrimarySiteOwner.Email, vUserMail) ||
     StartsWith(PPCustSecondarySiteOwner.Email, vUserMail)
     ), 
     Created, 
     Ascending
    )

     

    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.

     

  • marsdendd Profile Picture
    68 on at

    Hi @WarrenBelz 

     

    Thanks for your response. It seems the delegation is still an issue.

     

    papp-errs.png

     

    Regards

    Darren

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

    Hi @marsdendd ,

    OK - last hurdle.

    I did not know the type of field PPCustSecondarySiteOwner.Email was, but it is obviously a Person field which is not delegable.

    You need to use the same type of workaround used with dates - another field in your list (text in your case) reflecting this value and updated when the record is written or changed.

    Have a look at this post from @iAm_ManCat  - it explains the process well.

     

    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.

     

  • marsdendd Profile Picture
    68 on at

    Hi @WarrenBelz 

     

    Sorry I wasn't able to come back on this earlier.

    I wasn't able to find the specific post from @iAm_ManCat that you were referring to. 

    Darren

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

    Sorry @marsdendd ,

    I must have mixed up two threads I was answering at the time.

    The answer however is the same - delegation workarounds become part of life with Power Apps.

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 June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 352 Most Valuable Professional

#2
11manish Profile Picture

11manish 192

#3
Valantis Profile Picture

Valantis 128

Last 30 days Overall leaderboard