cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Florida712
Frequent Visitor

Delegation Warning - Dataverse Gallery Filtering

Hello,

I have a Gallery that shows data from Dataverse. My table has >50,000 rows added per year hence I am in Dataverse.
I want to avoid delegation warnings.
I have two comboboxes to use as input for filtering the gallery results. The gallery should be empty unless at one of the filter boxes has a value. I can live with only one of the two filter values being applied.

I use this code but get a delegation warning and do not know why (IsBlank, StartsWith, Filter - all should be delegable)

This is the code to address one combobox based filter only.
Thanks a lot

Filter(
'FPO EMS Truck Entry Data',
If(
IsBlank(cmbFilterCarrier_SRS.Selected.carrier),
true,
StartsWith(
Carrier,
cmbFilterCarrier_SRS.Selected.carrier
)
)

1 ACCEPTED SOLUTION

Accepted Solutions
RandyHayes
Super User
Super User

@Florida712 

Please consider changing your Formula to the following:

Filter('FPO EMS Truck Entry Data',
    !IsBlank(cmbFilterCarrier_SRS.Selected.carrier) && StartsWith(Carrier, cmbFilterCarrier_SRS.Selected.carrier)
) 

 

I am assuming that Carrier is a text column!

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

4 REPLIES 4
Pstork1
Dual Super User
Dual Super User

I believe you are getting the delegation warning because you are using the IF() inside the filter.  Try adding the IF() portion to a With() outside the filter and then use the value from the With in the filter.  Something like this

With({filterValue: If(
IsBlank(cmbFilterCarrier_SRS.Selected.carrier),
true, false) }
Filter(
'FPO EMS Truck Entry Data',
filterValue,
StartsWith(
Carrier,
cmbFilterCarrier_SRS.Selected.carrier
)
)

But I'm not sure what you are using the If() for.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Join me at 365 and PWR EduCon in Chicago
EduCon Chicago 2022

RandyHayes
Super User
Super User

@Florida712 

Please consider changing your Formula to the following:

Filter('FPO EMS Truck Entry Data',
    !IsBlank(cmbFilterCarrier_SRS.Selected.carrier) && StartsWith(Carrier, cmbFilterCarrier_SRS.Selected.carrier)
) 

 

I am assuming that Carrier is a text column!

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!
Florida712
Frequent Visitor

Thank you this worked well.

I have the FI-statement to allow me to have the gallery empty if no selection was made. Since I have such a large dataset I do not want all data to be brought in prior to filter or search by the user.
I will work with your approach on a combined filter. Thank you.

Helpful resources

Announcements
Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Super User 2 - 2022 Congratulations

Welcome Super Users

The Super User program for 2022 - Season 2 has kicked off!

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Users online (3,034)