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 / How to effecively dele...
Power Apps
Unanswered

How to effecively delegate Filter on User().Email attribute of Records Gallery?

(0) ShareShare
ReportReport
Posted on by 51

Hello PA community!

I have a super large SharePoint list (expected to cross 100,000 items)

I want users to be able to view and edit (i.e. provide their response) only to specific portions of the list

So I created a mix using separate PowerApp read-only form and edit form

 

1) I further want the users to only view and edit list items where there is no response already provided (Col1.Value = Blank())

 

2) I also need that specific users are able to see only the items relevant to their area. I manage this through a field in the SharePoint column called Col2.This field has email addresses concatenated by semi-colon ;

For example, abc@gmail.com; def@gmail.com; pqr@gmail.com

Some records may have one value only in Col2 field (abc@gmail.com), some may have 2 concatenated values (abc@gmail.com; def@gmail.com) while others may have 3 or more concatenated values (abc@gmail.com; def@gmail.com; pqr@gmail.com)

i.e. this number is variable

 

The filter that I have set on the records gallery is: 

Filter(List_Name, Col1.Value = Blank() && User().Email in ThisRecord.Col2)
 
Currently my list size is ~45,000 records
For testing purposes, I have updated a few records (<2000) with my own email address
However, I am unable to see any items in the Power App
I expect to see the records with my email ID in Col2
 
I am 100% certain that this delegation problem due to large dataset size, because the exact filter works on lists with smaller record count.
 
So my question is : How can I improve my Filter query so that this filtration gets delegated appropriately to SharePoint and I can see the records where Col2 has my email ID in it?
 
Happy Friday and thanks in advance!
Categories:
I have the same question (0)
  • v-yueyun-msft Profile Picture
    Microsoft Employee on at

    Hi , @powerautouser20 

    As for the document, "in" function is not delegable for SharePoint now.

    vyueyunmsft_0-1709877289508.png

    As for the workaround , you can try to create a flexible height gallery.

    vyueyunmsft_1-1709877359875.png

    And you need to put the delegable filter function in Gallery -items:(Here, i directly put the table name in it)

    vyueyunmsft_2-1709877386971.png

    Then you can put the control you need on this gallery. And then we can select all the control in the Gallery and put this code in the Visibile:

    Office365Users.MyProfileV2().mail in ThisItem.Persons

    Or 

    User().Email in ThisItem.Persons

     

    vyueyunmsft_3-1709877517551.png

    You may need to replace your column name in your side.

     

    If this reply can help you , you can click mark this reply as solution (Accept solution) which can help more people, thanks in advance! 

     

    Best Regards,

    Yueyun Zhang

     

     

  • DD-02090909-0 Profile Picture
    51 on at

    Hi @v-yueyun-msft , thanks for your suggestion.

    I am trying it at my end.

    If I understand correctly, you suggest to:

    1) create another object <ObjectName> within my App, i.e. the Fexible Height Gallery

    2) transfer delegable filter there i.e. Filter(List_Name, Col1.Value = Blank())

    3) Filter on this object using Filter(User.email() in <ObjectName>.<ColName>)

     

    Please let me know if that's correct.

    Apologies, but I am not very clear about how you are putting control / code visible, see my screenshot below

     

    Thank you!

     

    powerautouser20_0-1709878946723.png

     

     

    I am not 

  • v-yueyun-msft Profile Picture
    Microsoft Employee on at

    Hi , @powerautouser20 

    Yes , i mean you can try to add another control called "Fexible Height Gallery".

    You new "Fexible Height Gallery"- items can be:

    Filter(List_Name, Col1.Value = Blank())

     

    Then in Gallery , you can add the control you want to add in this  "Fexible Height Gallery":

    vyueyunmsft_0-1709879286934.png

    Then you can select all the controls in this Gallery (Here is "Label3" and "Label4"):
    Then put this code in the Visible:

    vyueyunmsft_1-1709879367593.png

     

     

     

     

    If this reply can help you , you can click mark this reply as solution (Accept solution) which can help more people, thanks in advance! 

     

    Best Regards,

    Yueyun Zhang

     

     

  • DD-02090909-0 Profile Picture
    51 on at

    Thanks for your explanation. I see the logic of it.

    I got it to work till adding the Flexible height gallery -> Items = Filter(List_Name, Col1.Value = Blank()) -> Add required controls as Text boxes -> Select all boxes -> put email address formula in the Visible property

     

    I still don't see any values, most likely because the underlined part above, is returning more than 2000 items.

    I see values when I remove this formula and simply set Visible = True

    Moreover, there is no error in how I have implemented the formula, as there are no squiggly lines in the Visible property of any of the controls I have inserted in the Flexible Height Gallery

     

    That makes me strongly suspect that underlined part is returning more than 2000 items.

     

    Is there any workaround for such situation (in bold above)?

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 Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 477

#2
WarrenBelz Profile Picture

WarrenBelz 341 Most Valuable Professional

#3
11manish Profile Picture

11manish 317

Last 30 days Overall leaderboard