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

Sharepoint Delegations Issues with Filter

Hi everyone,

 

I'm having issues whenever im trying to add startswith and if not function in my Items formula in Gallery,

Please help me to fix this issues,

 

 

    SortByColumns(If(ExpeditorCheckbox.Value = false,

    If(RequestCheckbox.Value = false,If(DateCheckbox.Value = false,Filter('SRE Request List', Geomarket.Value = DropDownGM.SelectedText.Value, StatusO_x002f_C.Value = DropDownStatus.SelectedText.Value, If(Not(DropDownPOState.SelectedText.Value = "All"), StartsWith(POState.Value, DropDownPOState.SelectedText.Value), StartsWith(POState.Value,POState.Value)), StartsWith(Traffic_x0020_Light,TrafficLight.Text), SearchBar.Text in PONumber),
    Filter('SRE Request List', Geomarket.Value = DropDownGM.SelectedText.Value, StatusO_x002f_C.Value = DropDownStatus.SelectedText.Value, If(Not(DropDownPOState.SelectedText.Value = "All"), StartsWith(POState.Value, DropDownPOState.SelectedText.Value), StartsWith(POState.Value,POState.Value)), NextFollowUpDate = NextFollowUpDateFilter.SelectedDate,StartsWith(ExpeditorName.DisplayName,NameInput.Text), StartsWith(Traffic_x0020_Light,TrafficLight.Text),SearchBar.Text in PONumber)))),
    "RequestID", Descending)

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support
Community Support

Re: Sharepoint Delegations Issues with Filter

Hi @mashimotokaware ,

Could you tell me how many records in your list?

If the records number is smaller than 2000, than the delegation warning will not effect your app's performance.

Just need to change the non-delegateable limit to 2000.

delegation.jpg

 

 If the record number is larger than 2000, the delegation warning will lead to some problems.

Here are two ways to avoid this effect:

1)get rid of delegation warning

Then you can not use un-delegateable functions in your formula.

In your formula, the key point is "in" operator.

"in" is not delegateable functions of sharepoint in powerapps.

You could use StartsWith to replace it. 

However, using StartsWith could only get some parts of the correct result, not all, since "in" and "startswith" are different meanings.

If you could accept this, you could modify your formula like this:

 SortByColumns(If(ExpeditorCheckbox.Value = false,

    If(RequestCheckbox.Value = false,If(DateCheckbox.Value = false,Filter('SRE Request List', Geomarket.Value = DropDownGM.SelectedText.Value, StatusO_x002f_C.Value = DropDownStatus.SelectedText.Value, If(Not(DropDownPOState.SelectedText.Value = "All"), StartsWith(POState.Value, DropDownPOState.SelectedText.Value), StartsWith(POState.Value,POState.Value)), StartsWith(Traffic_x0020_Light,TrafficLight.Text), StartsWith(PONumber,SearchBar.Text)),
    Filter('SRE Request List', Geomarket.Value = DropDownGM.SelectedText.Value, StatusO_x002f_C.Value = DropDownStatus.SelectedText.Value, If(Not(DropDownPOState.SelectedText.Value = "All"), StartsWith(POState.Value, DropDownPOState.SelectedText.Value), StartsWith(POState.Value,POState.Value)), NextFollowUpDate = NextFollowUpDateFilter.SelectedDate,StartsWith(ExpeditorName.DisplayName,NameInput.Text), StartsWith(Traffic_x0020_Light,TrafficLight.Text),StartsWith(PONumber,SearchBar.Text))))),
    "RequestID", Descending)

2)use collection instead.

In collection, there's no delegation limit.

So saving data in collection will avoid this problem.

Then you could use your original formulas on collection.

 

I notice that you've posted a similar issue, the views that engineers there posted are also meaningful:

https://powerusers.microsoft.com/t5/Building-Power-Apps/Delegation-Issues-in-IF-in-large-Dataset-Mor...

 

 

Best regards,

 

 

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

View solution in original post

4 REPLIES 4
WarrenBelz Community Champion
Community Champion

Re: Sharepoint Delegations Issues with Filter

Hi @mashimotokaware ,

Firstly if you could please use "Format Text" and post that output, it would be a lot easier to follow.

Firstly, Not and In are not delegable functions, so you will have issues in larger data sets.

I looked at your StartsWith functions and this one (which is in two places)

StartsWith(POState.Value,POState.Value)

could be ambiguous - if you rename one of these it might help. 

 

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.

mashimotokaware
Frequent Visitor

Re: Sharepoint Delegations Issues with Filter

Hi thank you for your response sir,

 

could you please help me give the right code so i could try and error the result sir ?

WarrenBelz Community Champion
Community Champion

Re: Sharepoint Delegations Issues with Filter

Hi @mashimotokaware ,

Can you please have a read of the post I just did on a similar issue for you.

If yo have any questions after that, I will be happy to answer them.

 

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.

Community Support
Community Support

Re: Sharepoint Delegations Issues with Filter

Hi @mashimotokaware ,

Could you tell me how many records in your list?

If the records number is smaller than 2000, than the delegation warning will not effect your app's performance.

Just need to change the non-delegateable limit to 2000.

delegation.jpg

 

 If the record number is larger than 2000, the delegation warning will lead to some problems.

Here are two ways to avoid this effect:

1)get rid of delegation warning

Then you can not use un-delegateable functions in your formula.

In your formula, the key point is "in" operator.

"in" is not delegateable functions of sharepoint in powerapps.

You could use StartsWith to replace it. 

However, using StartsWith could only get some parts of the correct result, not all, since "in" and "startswith" are different meanings.

If you could accept this, you could modify your formula like this:

 SortByColumns(If(ExpeditorCheckbox.Value = false,

    If(RequestCheckbox.Value = false,If(DateCheckbox.Value = false,Filter('SRE Request List', Geomarket.Value = DropDownGM.SelectedText.Value, StatusO_x002f_C.Value = DropDownStatus.SelectedText.Value, If(Not(DropDownPOState.SelectedText.Value = "All"), StartsWith(POState.Value, DropDownPOState.SelectedText.Value), StartsWith(POState.Value,POState.Value)), StartsWith(Traffic_x0020_Light,TrafficLight.Text), StartsWith(PONumber,SearchBar.Text)),
    Filter('SRE Request List', Geomarket.Value = DropDownGM.SelectedText.Value, StatusO_x002f_C.Value = DropDownStatus.SelectedText.Value, If(Not(DropDownPOState.SelectedText.Value = "All"), StartsWith(POState.Value, DropDownPOState.SelectedText.Value), StartsWith(POState.Value,POState.Value)), NextFollowUpDate = NextFollowUpDateFilter.SelectedDate,StartsWith(ExpeditorName.DisplayName,NameInput.Text), StartsWith(Traffic_x0020_Light,TrafficLight.Text),StartsWith(PONumber,SearchBar.Text))))),
    "RequestID", Descending)

2)use collection instead.

In collection, there's no delegation limit.

So saving data in collection will avoid this problem.

Then you could use your original formulas on collection.

 

I notice that you've posted a similar issue, the views that engineers there posted are also meaningful:

https://powerusers.microsoft.com/t5/Building-Power-Apps/Delegation-Issues-in-IF-in-large-Dataset-Mor...

 

 

Best regards,

 

 

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

View solution in original post

Helpful resources

Announcements
MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Apps Community!

Top Solution Authors
Top Kudoed Authors
Users online (7,201)