Delegate

We all know about delegation warnings in Power Apps, but how about delegation with SharePoint lists in Power Automate? Ever seen those blue lines in Power Automate?

Delegation with SharePoint lists warnings in Power Apps

In Power Apps there are quite a few delegation warnings that you can get.

Delegation with SharePoint lists in Power Apps

And when we hover over that blue line we will see that the Not function isn’t delegable within Power Apps.

Delegation with SharePoint lists Power Apps vs Power Automate Microsoft Power Automate, Microsoft Power Apps, Microsoft SharePoint Online image 21

Looking at the SharePoint connector documentation we quite quickly find out what all the issues are that we might hit when we see those blue lines.

But how about Power Automate.

Delegation in Power Automate

If we try the Get Items action in the experimental UI then we will find that the not equals is not available. Is this because of the delegation issues found within Power Apps? Or is this just one of those pains in Power Automate?

Delegation with SharePoint lists in Power Automate or maybe not

Then of course we have to try this in the non experimental UI as well.

Delegation with SharePoint lists Power Apps vs Power Automate Microsoft Power Automate, Microsoft Power Apps, Microsoft SharePoint Online image 23

And when we run this flow it actually just works. I’m getting the result that I’m expecting back.

This is probably also a good moment for a very large warning! If you switch between experimental features on and off then your flows will show the wrong filter. As the ne is simply replaced by Equals in the experiment UI. Luckily when you save the flow the not equals is saved. So it isn’t too bad other than that the UI is getting confused.

Querying large lists

Now if we create a list with 6000 items ( or any number larger than 5000). Then we will find that querying beyond the 5000 items will simply fail.

This isn’t immediately something to do with delegation. This is just SharePoint stopping us querying beyond 5000 items.

Delegation with SharePoint lists Power Apps vs Power Automate Microsoft Power Automate, Microsoft Power Apps, Microsoft SharePoint Online image 24

Checking our SharePoint list settings, we will find that there isn’t an index on the Title column.

Delegation with SharePoint lists Power Apps vs Power Automate Microsoft Power Automate, Microsoft Power Apps, Microsoft SharePoint Online image 25

Creating an index on the Title column means that we can query beyond the 5000 items.

And even if we now use an not equals comparison in the OData filter query, we will get the right items back.

Delegation with SharePoint lists Power Apps vs Power Automate Microsoft Power Automate, Microsoft Power Apps, Microsoft SharePoint Online image 26

To make the equivalent query work in Power Apps, you would probably have to do something like this:

Delegation with SharePoint lists Power Apps vs Power Automate Microsoft Power Automate, Microsoft Power Apps, Microsoft SharePoint Online image 27

Where the Power Apps method is all about avoiding delegation warnings. Power Automate simply seems to work with the SharePoint indexes. This gives us the option to use Power Automate to do the querying instead of avoiding delegation issues in Power Apps

Avatar for Pieter Veenstra

By Pieter Veenstra

Business Applications Microsoft MVP working as a Principal Architect at HybrIT Services Ltd. You can contact me using contact@sharepains.com

5 thoughts on “Delegation with SharePoint lists Power Apps vs Power Automate”
  1. Wow! The experimental UI changes ne to eq??? Shame on MS. This should be handled differently. If they can’t convert it properly, they should just not allow use of the experimental UI for apps that have that issue.

    1. Hi Jon,

      I did some more testing and it looks like the saving of the flow keeps the ‘ne’ option there. Even though it doesn’t show up in the UI as such. I’ve updated the post and reported this to the Microsoft team.

  2. Thanks for this – I work a lot with Sharepoint lists and automate and apps, but have always sort of “ignored” the entire indexing topic.
    Always thought that somehow does not apply to my needs / use cases.
    Do you know up to which limit the delegation would work using indexing?
    Are there any other aspects important to know about indexing?
    Thanks again!

  3. Great article on delegation with SharePoint lists! Power Apps Development has truly revolutionized the way we build robust applications. With its seamless integration and extensive capabilities, it allows us to create efficient solutions that can handle large data sets while maintaining performance. Leveraging delegation in Microsoft Power Apps enables us to offload data processing to the data source, optimizing app performance and enhancing user experience. This article provides valuable insights and practical tips for maximizing the benefits of delegation. Kudos to the author for sharing this informative piece!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Discover more from SharePains by Microsoft MVP Pieter Veenstra

Subscribe now to keep reading and get access to the full archive.

Continue Reading

%d bloggers like this: