Mastering Delegation in Power Apps: A Comprehensive Guide

Sdílet
Vložit
  • čas přidán 9. 07. 2024
  • #powerapps #PowerPlatform #CanvasApps
    Up your Power Apps Skills Today!
    Link: www.powerapps911.com/up-your-...
    In this in-depth tutorial, we dive deep into the concept of delegation in Power Apps, a crucial aspect that every Power Apps developer needs to understand for building efficient and high-performing applications.
    Learn how delegation works with different data sources like SharePoint and Dataverse and understand the difference between "delegable" and "non-delegable" queries. This video provides a hands-on demonstration of connecting a Power App to a SharePoint list, adding a gallery to display data, and how Power Apps retrieves data on an as-needed basis, enhancing performance when dealing with large data sets.
    We also explore the "data row limit" setting in Power Apps, which determines the number of records Power Apps retrieves for non-delegable queries. Discover how some queries that are non-delegable in SharePoint become delegable in Dataverse, and how this impacts the functionality and performance of your app.
    This video is a must-watch for anyone looking to master Power Apps, whether you're a beginner just starting out or an experienced developer looking to brush up on your skills. By understanding delegation, you'll be able to build more efficient, responsive applications, ensuring a smooth user experience even when dealing with large data sets.
    We also discuss common pitfalls and misconceptions about delegation in Power Apps, providing you with the knowledge to avoid potential issues in your app development process.
    Don't forget to like, share, and subscribe for more tutorials on mastering Power Apps. For further resources and in-depth training classes, check out the links in the description below. Happy app building!
    Need some help on something you are working on, contact us!
    Link: www.powerapps911.com/contact
    0:00 Start
    0:35 Adding a large SharePoint List and Gallery
    1:58 Gallery AllItemsCount and scrolling
    3:35 Filter with Delegation working
    4:55 Search fucntion and no Delegation
    7:17 Changing the Delegation limit and the 2000 item limit
    9:12 Comparing SharePoint and Dataverse delegation
    11:30 Power Apps Delegation Documentation Overview
    14:37 SharePoint ID doesn't work
    15:45 Be weary
    16:40 Set Data Row Limit to 1 to troubleshoot
    18:01 Protect your users and common problems
    20:33 Collections are not Delegable
    PowerApps911
    Link: www.powerapps911.com/
    Let's connect on social!
    Twitter: / shanescows
    Facebook: / powerapps911
    Instagram: / shaneyoung911
    LinkedIn: / cincyshane
  • Věda a technologie

Komentáře • 112

  • @davidgreen6486
    @davidgreen6486 Před 11 měsíci +17

    Thanks for explaining the horrors of delegation, Shane. Just in time as well, as I have a Power apps interview tomorrow and I JUST KNOW that the 'D' word will crop up at some point in my ordeal. Wish me luck!

    • @nikolagrkovic8769
      @nikolagrkovic8769 Před 11 měsíci +1

      How did it go?🎉

    • @ShanesCows
      @ShanesCows  Před 11 měsíci +1

      Happy to help. How did it go?

    • @davidgreen6486
      @davidgreen6486 Před 11 měsíci +1

      @@ShanesCows funny story -- I got the day wrong! It's actually tomorrow 12:00 GMT. Wish me luck...again!

    • @nightfire1266
      @nightfire1266 Před 11 měsíci

      @@davidgreen6486 Hope it went well!

    • @user-li7cs2xf2n
      @user-li7cs2xf2n Před 11 měsíci +1

      also have an interview tomorrow also I feel very attacked for using collections.

  • @Cybermatik
    @Cybermatik Před 11 měsíci +4

    A big thank for your amazing tip to place the non delegation limit to 1 in order to not fall into Power Apps lying in our faces!
    Deal with delegation is not easy and has to be considered and done at the beginning of the app making, a good reminder ;)

    • @ShanesCows
      @ShanesCows  Před 11 měsíci +1

      😎 Comments like this make me smile. Thank you 😊

  • @stuartduncan2772
    @stuartduncan2772 Před měsícem

    I broke one of my apps today. It made me come scrambling back to you for help. I watched this video a few times when I started using Power Apps but it's always good to get a refresh. Thanks again Shane.

    • @ShanesCows
      @ShanesCows  Před měsícem

      Glad it helped! Always panic when you break something that was working. 🙃

  • @athanasioszisopoulos387
    @athanasioszisopoulos387 Před 5 měsíci

    Oh my god, that was great, thank you!

  • @spen2431
    @spen2431 Před 11 měsíci +1

    A great refresher... thanks Shane 💥💥

    • @ShanesCows
      @ShanesCows  Před 11 měsíci

      Happy to help. Have a great day. 🐶

  • @HumanityFirst24
    @HumanityFirst24 Před 10 měsíci +1

    Learned few good tips to test delegation. Thank You, Shawn.

  • @isabelaramalho3112
    @isabelaramalho3112 Před 2 měsíci +1

    Thank you so much. This video helped me a lot! : )

  • @THEDTSMAN
    @THEDTSMAN Před 11 měsíci +1

    Good video on explaining delegation. Definitely a video a lot of people can benefit from. Thanks

  • @dougydoe
    @dougydoe Před 11 měsíci +1

    Great video and content. Always good to refresh ones memory about this important topic. Thanks for sharing

    • @ShanesCows
      @ShanesCows  Před 11 měsíci

      Happy to help. Have a great day. 🐶

  • @thrilled2bits
    @thrilled2bits Před 11 měsíci +1

    Excellent vid, Shane. Appreciate it.

  • @franknielsen3219
    @franknielsen3219 Před 11 měsíci +1

    THX for a very good recap. Cannot wait to start on your Power Platform University

    • @ShanesCows
      @ShanesCows  Před 11 měsíci +1

      Looking forward to having you Frank. 😎

  • @oluwatobipaul6171
    @oluwatobipaul6171 Před 10 měsíci +1

    Thank you Shane Young for the refresher on delegation

  • @atehaa
    @atehaa Před 5 měsíci +1

    Setting limit to 1 is a really nice trick. Thanks!

  • @joelsnellman1729
    @joelsnellman1729 Před 11 měsíci +1

    Hi Shane, thank you for your awesome content! A question about performance. I have an 'Inventory Transaction' table, in which the amount of rows will be huge. in the same table, I have incoming (one row) and outgoing (can be several rows). All the outgoing rows are related to one incoming row. Meaning, I can calculate the current saldo of the incoming row, by a filter and sum function of incoming and outgoing rows.
    I have two options. To add one 'Current Saldo' column, that always have the calculated sum up to date.
    Or I can always use the filter and sum function to calculate the current saldo.
    What is your thoughts on performance in this case. I would prefer to always use the filter and sum function. But since the inventory table will be huge, and, many times I will need to perform the sum filter calculation for roughly 100 rows, affecting perhaps 100 rows each, meaning 10 000 rows in total.
    I would be really thankful for your thoughts in this case!

  • @davidjimenez8952
    @davidjimenez8952 Před 10 měsíci +1

    Master class again. top!

  • @jjpk80
    @jjpk80 Před 11 měsíci +1

    Excellent explanation.

  • @Anenah
    @Anenah Před 11 měsíci +1

    Thanks!

    • @ShanesCows
      @ShanesCows  Před 11 měsíci

      Thank you for the support. 😎

  • @martinc3907
    @martinc3907 Před 4 měsíci +1

    Date is not delegable so I can't use a date picker, I have to convert the date to an integer. But why? Having fun as my main table has over 1 million rows and the date table over 30,000 rows. And I am using SQL. Thanks for the clear collect tip I'll won't use that and see if that resolves one of my delegation issues. However not happy about having to filter on integer date.

  • @firmhand
    @firmhand Před 11 měsíci +1

    is that an artificial limitation? I expected Sharepoint to be able to do odata API. It has search… Weird to call it delegation when it’s an api call basically

  • @davediguer4770
    @davediguer4770 Před 4 měsíci +1

    Thanks for the video - any insights on how to deal with Delegation and the non-delegable Distinct() function ?

    • @ShanesCows
      @ShanesCows  Před 4 měsíci

      Distinct not being delegable isn't something I have a work around for. Best I can offer is trying to shrink your data set first with nested fucntions. czcams.com/video/iG8SjWtX1yM/video.html

  • @TheKermit2110
    @TheKermit2110 Před 11 měsíci +1

    Shane, cheers again, such an important video. I went back through your related vids and a Q occurred to me that has never been clarified (perhaps because the answer is obvious but we are all told “there are no stupid questions” so….): Most of the time users want more recent records. Does delegation always work on 1st x records based on ID index from 1st to last, OR…..if the E.g. Sharepoint list is sorted ‘newest to oldest’ , would delegation work on the most recent items?

    • @ShanesCows
      @ShanesCows  Před 11 měsíci +2

      You can nest queries. So put your delegable sort inside of a non-delegable query to get what you want. 🤩 This video talks about it. czcams.com/video/lYi24okXDPs/video.html

  • @islamezz5019
    @islamezz5019 Před 3 měsíci

    Thank you for this Video
    i have a problem with Filter Function Result
    i know Delegation limitation but i use a simple Filter to get a table data as below
    in text Proberty for Text Label >>> Count Row(Filter('My Data Verse Table', 'email column' = User().email))
    But i get only one record Table
    if i use >>> Filter('My Data Verse Table', 'email Coulon' = User().email) in item Proberty for a gallary it list all record Correctly.
    Can You offer some help.
    Thank You.

  • @MrPaulpierce34
    @MrPaulpierce34 Před 10 měsíci +1

    Hey Shane, thanks for all the material you share. Quick question. I know that collections are non delegable. However, I am wondering if they are partially delegable. For example, ClearCollect(collectionName,Filter(datasource,dropdown.Selected.Id = Id)). Is the filter portion of the equation delegable?

    • @ShanesCows
      @ShanesCows  Před 10 měsíci

      Yes. This video will help on partial delegation like you are thinking about czcams.com/video/iG8SjWtX1yM/video.html

  • @felixverduin569
    @felixverduin569 Před 11 měsíci +4

    The fact that AddColumns isn't delegable but there is no warning is a very nasty feature. Tip, set the delegation limit to one or three rows to check your application for these invisible delegation warnings. Edit: shane explains this! Very good tip.

    • @ShanesCows
      @ShanesCows  Před 11 měsíci

      Great minds think alike 😎

  • @funkycowie
    @funkycowie Před 3 měsíci +1

    So where sharepoint can be viewed in an excel file via a query connection, is that limited in the same way?

    • @ShanesCows
      @ShanesCows  Před 2 měsíci

      I am not sure, I have never looked into how Excel does it. SOrry.

  • @blairforbes1132
    @blairforbes1132 Před 11 měsíci +5

    I guess a good point to take away from this video is also not to use SharePoint as a data source

    • @ShanesCows
      @ShanesCows  Před 11 měsíci +1

      It has its challenges for sure but most apps are built on it.

  • @1culcat
    @1culcat Před 7 měsíci +1

    Hey shane! Great video! If i were to move to use SQL to house my data, is there licensing issues if internal users want to use my powerapp? Will they need premium licensing as well?

    • @ShanesCows
      @ShanesCows  Před 7 měsíci +1

      Yes, SQL is a premium datasource so all users of the app internal or external would need a premium license

  • @timwalter6989
    @timwalter6989 Před 11 měsíci +1

    As always, great job in explaining the concepts and use of the Power Platform! The only thing missing from your recent videos is the "Intro"... What's up with dropping it?

    • @ShanesCows
      @ShanesCows  Před 11 měsíci

      Been trying different formats to get to the content faster. I also miss “here’s our intro@ 😍

    • @caraziegel7652
      @caraziegel7652 Před 11 měsíci +1

      @@ShanesCows i like 'These guys!' lol

  • @Perfektionist
    @Perfektionist Před 11 měsíci +1

    When i change my delegation limit to 2 for testing purposes, all of my Dropdowns that normally just use an unfilitered sharepoint list as datasource get cut after the second entry. Is this really a delegation limit or is that a different powerplatform problem? Because in the dropdowns there should be nothing to delegate?

    • @ShanesCows
      @ShanesCows  Před 11 měsíci

      Interesting. I never realized this. I wonder if it changed. 🫤 But you are correct, the Delegation limit effect dropdowns even for delegable queries. 😔

  • @robofski
    @robofski Před 11 měsíci +1

    Really well explained, I finally understand delegation 😂

  • @ItsGravix
    @ItsGravix Před 5 měsíci +1

    Lol I wish I had more teachers like you !!

  • @davidallard9913
    @davidallard9913 Před 11 měsíci +2

    Awesome video !
    If I understand right, If I use Dataverse with 100000 entries , the search, filter, whatever, PowerApps will find and show me all record I want, even if there filter/find 20000 entries ?

    • @ShanesCows
      @ShanesCows  Před 11 měsíci +1

      Yup. 😎 I have never scrolled past 8700 entries but in theory it could keep goin.

  • @aaron6516
    @aaron6516 Před 11 měsíci +1

    I would LOVE to see an affordable expansion of Dataverse capacity. Dataverse could be so amazing if I could just store more in it. I need the best of both SQL and SharePoint. Dataverse would be it except I keep hitting capacity limits...

    • @ShanesCows
      @ShanesCows  Před 11 měsíci

      I am hopeful overtime we continue to see economies of scale and lower pricing. I agree with your thoughts.

  • @MultiMinhgiang
    @MultiMinhgiang Před 11 měsíci +1

    How to merge Screen or two apps into one in power apps ? I have two different apps.
    Thank you !!!

    • @ShanesCows
      @ShanesCows  Před 11 měsíci

      You can copy and paste between apps in studio. Open Both and copy and paste is no problem

  • @Andyandrwew144
    @Andyandrwew144 Před 11 měsíci +2

    I build my apps with a delegation limit of 1 to be 100% sure I am not being limited by delegation.

  • @ceyloncitizen8740
    @ceyloncitizen8740 Před 11 měsíci +2

    Thank you Shane ❤️‍🔥❤️‍🔥❤️‍🔥

  • @piotrrusak
    @piotrrusak Před 11 měsíci

    Shane - great video (as always).
    I have question to gallery behavior shown in your video (but not fully) - you mentioned gallery connected to large list can load all items (when you will scroll) - you reached 6000 items (no error on your side). I did some more tests with list that contained +10 000 items, results:
    every time I reach more than 5000 items: 5300 / 5500 / 1 time I reached 8000 items I receive following error in Network tab
    Status: 400, "The attempted operation is prohibited because it exceeds the list view threshold." Scroll does not work anymore.
    My Gallery's Data Source is super simple: just 'Large List' (no filtering, no nothing fancy) Gallery inside just displays single title.
    I believe it is connected with SP List limitations and ID field not being Indexed :-( (OOTB SharePoint online uses this ID to do paging / via RenderListDataAsStream API requests)
    Any comments from your side (how to bypass this limit - to have infinite scroll possibility ??)

    • @DavidAdediran
      @DavidAdediran Před 11 měsíci

      Unfortunately, pagination in Power Apps is very inconsistent, and it rarely even works properly.
      What it does most of the time is to download an increasing amount of data each time. In other words, it gets 100 items, then 200 items, and so on. Rather than just the next 100 items. Actually, it's worse than that.
      The effect, of course, is that a request of more than 5000 items will be reached, and the limit threshold error will inevitably occur.

    • @piotrrusak
      @piotrrusak Před 11 měsíci

      @ShanesCows can you please take a look on above and share your thoughts on this

  • @ABCD-ABCDEFGH
    @ABCD-ABCDEFGH Před 11 měsíci +1

    where is the link to the video with the workaround for the delegation limit?

    • @ShanesCows
      @ShanesCows  Před 11 měsíci

      This one. czcams.com/video/lYi24okXDPs/video.html

  • @villagefood1179
    @villagefood1179 Před 11 měsíci +1

    This is great video but We want video about Power Apps with Sql End to End Project that helps lot

  • @ResponsibleXI
    @ResponsibleXI Před 11 měsíci +1

    But when does the SharePoint list threshold limit of 5000 hits the Power Apps? When the gallery is showing 10000 items, its definitely overcoming the threshold limit. Or did I miss anything here?

    • @finnpower92
      @finnpower92 Před 11 měsíci +1

      What do you mean Sharepoint List limit being 5000? I thought you can have like 50k-500k rows in a Sharepoint List?

    • @ResponsibleXI
      @ResponsibleXI Před 11 měsíci +1

      @@finnpower92 you can have 30 million items in SharePoint list. But there is a threshold limit of 5000 per list view. Just checking with Shane if there is an impact on PowerApps due to that threshold limit

    • @ShanesCows
      @ShanesCows  Před 11 měsíci

      The 5000 item limit in SharePoint is around filtering views. If you index the column in SharePoint you can stretch to 25k items last time I checked. 😎

    • @ResponsibleXI
      @ResponsibleXI Před 11 měsíci

      Thank you!

  • @MrKhulaid
    @MrKhulaid Před 5 měsíci +1

    I was told that distinct with nested filter delegates 50k records, Is that true

    • @ShanesCows
      @ShanesCows  Před 5 měsíci +1

      Distinct is not delegable as far as I know. Unless they added it for DataVerse

    • @MrKhulaid
      @MrKhulaid Před 5 měsíci

      @ShanesCows Thanks Shane, apprwcite the reply. Do you know if countrows with nested filters can return 50k rows from sharepoint?

  • @austinstern
    @austinstern Před 11 měsíci +1

    I hate to say it but the technical reason SharePoint doesn't delegate where it probably should is most likely to make people pay for dataverse

  • @jeanpierreragequit1726
    @jeanpierreragequit1726 Před 11 měsíci +1

    I just finished to understand clearly u could mix for the worst a Filter delegable function with an In operator making all ur formula undelegable with text.
    Happened to me so many time til i saw a former video from u using Startswith function to avoid the In operator.
    U r so didactic ! Thx u again for ur work & ur video !!!

  • @jefflund5685
    @jefflund5685 Před 11 měsíci +1

    Woot! First!

  • @michelhegeraat5430
    @michelhegeraat5430 Před 11 měsíci

    Knowing that you are a SharePoint guru I'm sure you also know that behind SharePoint list is .... an SQL database. So we don't need to wonder why we have these delegation issues. We know it is intentionally caused by our friends at microsoft. I just need to figure out why we should move away from their SharePoint to another microsoft product. But I guess it all comes down to licencing costs allowing them to make a little more money.

  • @shud7101
    @shud7101 Před 11 měsíci +1

    Off topic but it looks like Microsoft fixed that weird separator in galleries.

    • @caraziegel7652
      @caraziegel7652 Před 11 měsíci +1

      when? i still had it today - i mean, they did fix its positioning though. its just that its white and the background is white.

    • @shud7101
      @shud7101 Před 11 měsíci +2

      @@caraziegel7652 the position thing was very annoying.

    • @ShanesCows
      @ShanesCows  Před 11 měsíci

      I still had problems with it last week so I am hopeful you are right. 😎

    • @shud7101
      @shud7101 Před 11 měsíci

      @@ShanesCows I added a gallery to an app yesterday and it wasn’t giving me a problem. Hopefully it wasn’t a fluke.

  • @davidgraf8012
    @davidgraf8012 Před 9 měsíci +1

    It's irresponsible on the part of MS to make an issue of delegation. Putting users in a bind of either messing with delegation or spending big bucks on premium sources like Dataverse is a vendor created problem. People like Shane need to start calling MS out on this.

    • @ShanesCows
      @ShanesCows  Před 9 měsíci

      David I think the would say it is technical limitations of SharePoint as a data source but not sure. Sorry, don't shoot the messenger. :)

  • @kehindeakiode2865
    @kehindeakiode2865 Před 11 měsíci +1

    First to like

  • @user-hy2gk6qz1r
    @user-hy2gk6qz1r Před 11 měsíci +1

    Hey Shane. There is a work around provided here: czcams.com/video/QNSRKpyIHPg/video.html. Is that something you would suggest to overcome the 2000 limit or not? Could it cause performance issues? Thnx for the help anyway!!

    • @ShanesCows
      @ShanesCows  Před 11 měsíci

      It works but it scares me that you are creating stability issues. I feel like Microsoft limited things to 2000 for a reason so I never go over it. But it is possible for sure. :)

  • @rlogborn
    @rlogborn Před 11 měsíci +1

    2000 - meh!

  • @wcait8303
    @wcait8303 Před 2 měsíci +1

    Hi Shane,
    My name is Mike and I'm having trouble trying to find a way to solve delegation warning on my power app. I'm using sharepoint lists for my datasource.
    So I have a grid calling WorkOrderDetail list that has ProductId column. I want to display on the grid sum of Qty from ReceivingDetail list where ProductId = ThisItem.ProductId.
    this is my code:
    Sum(Filter(ReceivingDetail, ProductId = ThisItem.ProductId), TotalReceivedQty)
    but i got the delegation warning. How can I solve this problem?
    Thank you
    Mike

    • @ShanesCows
      @ShanesCows  Před 2 měsíci

      Because Sum is not delegable with your data souce, you can't. :( But let me ask you this? How many records does your Filter formula return? If it is less than the delegation limit, then you will be fine. You can learn more about how nested delegable and non-delegable queries behave here. czcams.com/video/iG8SjWtX1yM/video.html