cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
iagosalvadori Helper I
Helper I

Delegation warning on Sharepoint

Hi everyone,

 

I am a beginner in powerapps and I have a question that I am unable to resolve.

 

I am developing an expense application, and I would like the finals users to be able to view the expenses that were sent:

uuuuu.png

Status Approval:

  • Open
  • Aprroved
  • Deny

I write the code to make it possible, an warning appears and I don't know how to overcome a situation:

ffffff.png

Is it possible to do that?

2 ACCEPTED SOLUTIONS

Accepted Solutions
Highlighted
Dual Super User
Dual Super User

Re: Delegation warning on Sharepoint

Hi @iagosalvadori 

 

Sum is not a delegable function.

List of delegable functions with respect to data source - 

CDS - https://docs.microsoft.com/en-us/connectors/commondataservice/

SharePoint - https://docs.microsoft.com/en-us/connectors/sharepointonline/

SQL - https://docs.microsoft.com/en-us/connectors/sql/

 

If you want to learn more about delegation:-

https://www.youtube.com/playlist?list=PLTyFh-qDKAiE6ia-D94Qk5-AzpN4dqOmD

 

 

--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

Thanks,
Reza Dorrani, MVP
YouTube
Twitter

 

View solution in original post

Super User
Super User

Re: Delegation warning on Sharepoint

@RezaDorrani 

An alternate approach without Flow might be to store the totals for each user in a SharePoint list.

 

UserEmail Abertas Aprovadas Recusadas
dsmith@xyz.com 233 655 435
fcole@xyz.com 3565 435 543
jgreen@xyz.com 3456 5435 636

 

Then each time an action is taken: Abertas, Aprovadas, Recusadas you could PATCH to update the totals.  Do you think this technique might work here?

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up”

View solution in original post

9 REPLIES 9
Highlighted
Dual Super User
Dual Super User

Re: Delegation warning on Sharepoint

Hi @iagosalvadori 

 

Sum is not a delegable function.

List of delegable functions with respect to data source - 

CDS - https://docs.microsoft.com/en-us/connectors/commondataservice/

SharePoint - https://docs.microsoft.com/en-us/connectors/sharepointonline/

SQL - https://docs.microsoft.com/en-us/connectors/sql/

 

If you want to learn more about delegation:-

https://www.youtube.com/playlist?list=PLTyFh-qDKAiE6ia-D94Qk5-AzpN4dqOmD

 

 

--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

Thanks,
Reza Dorrani, MVP
YouTube
Twitter

 

View solution in original post

Super User
Super User

Re: Delegation warning on Sharepoint

@iagosalvadori 

The SUM function cannot be delegated in SharePoint.  Please see below for a list of formulas that can be delegated.

 

One simple thing you can do is go to the advanced settings and increase your delegation limit to 2,000 rows.  Other than that you would have to write some code that would store the totals for each user in SharePoint beside their userid/email.

 


SharepointDelegation.png

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

iagosalvadori Helper I
Helper I

Re: Delegation warning on Sharepoint

Thank you @RezaDorrani 

 

I´ll try to find a solution without using the sum fuction. 

Dual Super User
Dual Super User

Re: Delegation warning on Sharepoint

@iagosalvadori 

 

One option is to call a flow to do the calculation and return the value to Power Apps.

Adv: Real time

Disadv: Will require a flow run for every user request

 

Another option is to periodically run a flow to perform calculations and update a list where totals are maintained. Power Apps can then read data from this list. (not real time)

Adv: Flows run on a defined schedule

Disadv: Not real time

 

--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

Thanks,
Reza Dorrani, MVP
YouTube
Twitter

Super User
Super User

Re: Delegation warning on Sharepoint

@RezaDorrani 

An alternate approach without Flow might be to store the totals for each user in a SharePoint list.

 

UserEmail Abertas Aprovadas Recusadas
dsmith@xyz.com 233 655 435
fcole@xyz.com 3565 435 543
jgreen@xyz.com 3456 5435 636

 

Then each time an action is taken: Abertas, Aprovadas, Recusadas you could PATCH to update the totals.  Do you think this technique might work here?

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up”

View solution in original post

Dual Super User
Dual Super User

Re: Delegation warning on Sharepoint

Hi @mdevaney 

 

In case of a user based total scenario - Yes.

But I feel it looks like too much work and a better workaround would be to use flow.

 

However in case of a user based scenario. As max delegation limit is 2000.

First one should filter all results for a specific user which would reduce the data set retrieved. ( Assuming no user has more than 2000 items returned based on the filter). Then the Sum function delegation warning would yield accurate results.

 

--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

Thanks,
Reza Dorrani, MVP
YouTube
Twitter

iagosalvadori Helper I
Helper I

Re: Delegation warning on Sharepoint

Hi @mdevaney 

 

Yes, maybe.

 

But the status is updated as the flow progresses ... Where should the PATCH command be? In the flow or in the app?

iagosalvadori Helper I
Helper I

Re: Delegation warning on Sharepoint

@RezaDorrani 

 

The second option was ideal, but I don't know how to do it yet...

 

I'll check how I can create this flow to keep this list up to date.

 

Thank you

Super User
Super User

Re: Delegation warning on Sharepoint

 @RezaDorrani 

Thanks for the additional discussion on this topic.  I agree, Flow would be less work to implement in this scenario.

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 (8,392)