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

Help writing filter statement to avoid Delegation issue...

Hi Team,

 

how i can write below filter to avoid delegation 

SortByColumns(Filter(Creditcardapplication,And(Or(Lower( NextApprover.Email)=Lower( User().Email),Lower( NextApproverBU.Email)=Lower( User().Email)),And(FinalStatus<>"Approved",FinalStatus<>"Rejected"))),"ID",Descending)

 

NextApprover and NextApproverBU,FinalStatus it is giving delegation issue 

 

Thanks

gautmish

2 REPLIES 2
timl
Super User
Super User

Hi Gautmish,

What data source are you using?

If it's a SharePoint data source and if NextApprover and NextApproverBU are Person fields, these types of queries can not be made delegable.

Here's a post with more details and some workarounds.

https://powerusers.microsoft.com/t5/General-Discussion/Filter-BrowseGallery-by-User-500s-limit/m-p/2...

 

 

v-xida-msft
Community Support
Community Support

Hi @gautmish ,

Could you please share a bit more about the data source ('Creditcardapplication') that you mentioned? Is it a SP list?

Are the NextApprover, NextApproverBU columns both Person type column in your SP list?

Further, could you please share a bit more about the Delegation issue within your app?

 

If you want to get rid the Delegation warning issue within your formula, I have made a test on my side, please take a try with the following workaround (if the amount of the data source records is not more than 2000😞

Set the OnVisible property of the first screen of your app to following:

ClearCollect(RecordsCollection, Creditcardapplication)

then modify your SortByColumns formula as below:

SortByColumns(
Filter(
RecordsCollection,
And(Or(Lower( NextApprover.Email)=Lower( User().Email),Lower( NextApproverBU.Email)=Lower( User().Email)),And(FinalStatus<>"Approved",FinalStatus<>"Rejected"))
),
"ID",
Descending
)

Please take a try with the above solution, then check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on June 15, 2022 at 8am PDT.

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Top Kudoed Authors
Users online (2,393)