cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
powerapps890
Post Prodigy
Post Prodigy

Delegation warning on items in gallery

Filter( 'Submitted Requests', If( IsBlank(ComboBox1.Selected.Result) || ComboBox1.Selected.Result = "All", true, 'Requestor Country' in ComboBox1.SelectedItems ) && If( IsBlank(Filter_10.Text), true, Filter_10.Text in 'Submitted Date' ) && If( IsBlank(Filter_3.Text), true, Filter_3.Text in Title )&& If( IsBlank(Filter_4.Text), true, Filter_4.Text in 'Requestor Name') )Capture.PNG

This is my items in the gallery. The problem is I have a delegation warning for large data sets. I know that if I used a collection it would go away. The problem is that when I submit a form the collection does not update unless onstart is pushed and the item will not be in the gallery until I reload the app. Is there a way I can alter the collection portion so it updates fast enough to get rid of the delegation warning?

10 REPLIES 10
Drrickryp
Super User II
Super User II

Hi @powerapps890 

Try

 

With({wfiltered:Filter( 'Submitted Requests', If( IsBlank(ComboBox1.Selected.Result) || ComboBox1.Selected.Result = "All", true, 'Requestor Country' in ComboBox1.SelectedItems ) && If( IsBlank(Filter_10.Text), true, Filter_10.Text in 'Submitted Date' ) && If( IsBlank(Filter_3.Text), true, Filter_3.Text in Title )&& If( IsBlank(Filter_4.Text), true, Filter_4.Text in 'Requestor Name') )},
wfiltered
)

 

 as the Items property of your gallery.  I have not tried to see if your formula works or not (I'm assuming it does), but this will eliminate the delegation warning. 

Capture.PNG@Drrickryp I still have the warning with that

Drrickryp
Super User II
Super User II

Hi @powerapps890 

Hmm, I'm afraid that the "in" operator is the problem.  BTW just how big is your dataset of Submitted Requests?

It could be thousands and is there a way to alter it? @Drrickryp 

Is there a way to fix this and remove the in operator @Drrickryp 

Drrickryp
Super User II
Super User II

@powerapps890 

Only if you can use StartsWith() in your filter instead of "in". To avoid delegation errors you can only use functions that are delegatable in SharePoint with large datasets. If you switch to dataverse or sql from SharePoint you can use Search() and it is delegatable for those datasources

I have to use sharepoint but when I tried the with you suggested up there I still had the delegation errors @Drrickryp 

Drrickryp
Super User II
Super User II

Hi @powerapps890 

Could you post your current formula please as well as the type of fields in your list, ie. single line of text, choice, lookup, etc? 

Filter(
'Submitted Requests',
If(
IsBlank(ComboBox1.Selected.Result) || ComboBox1.Selected.Result = "All",
true,
'Requestor Country' in ComboBox1.SelectedItems
) && If(
IsBlank(ComboBox1_10.Selected.Result) || ComboBox1_10.Selected.Result = "All",
true,
Application in ComboBox1_10.SelectedItems
)&& If(
IsBlank(ComboBox1_11.Selected.Result) || ComboBox1_11.Selected.Result = "All",
true,
'Process Step' in ComboBox1_11.SelectedItems
) && If(
IsBlank(ComboBox1_12.Selected.Result) || ComboBox1_12.Selected.Result = "All",
true,
Status in ComboBox1_12.SelectedItems
)&&
If(
IsBlank(Filter_14.Text),
true,
Filter_14.Text in 'Submitted Date'
) &&
If(
IsBlank(Filter_4.Text),
true,
Filter_4.Text in 'Request Name'
))

The fields are single, multiline and date @Drrickryp 

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Top Kudoed Authors
Users online (53,886)