Mastering Delegation in Power Apps: A Comprehensive Guide

Поделиться
HTML-код
  • Опубликовано: 11 июл 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
  • НаукаНаука

Комментарии • 112

  • @davidgreen6486
    @davidgreen6486 11 месяцев назад +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 11 месяцев назад +1

      How did it go?🎉

    • @ShanesCows
      @ShanesCows  11 месяцев назад +1

      Happy to help. How did it go?

    • @davidgreen6486
      @davidgreen6486 11 месяцев назад +1

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

    • @nightfire1266
      @nightfire1266 11 месяцев назад

      @@davidgreen6486 Hope it went well!

    • @user-li7cs2xf2n
      @user-li7cs2xf2n 11 месяцев назад +1

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

  • @Cybermatik
    @Cybermatik 11 месяцев назад +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  11 месяцев назад +1

      😎 Comments like this make me smile. Thank you 😊

  • @stuartduncan2772
    @stuartduncan2772 Месяц назад

    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  Месяц назад

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

  • @athanasioszisopoulos387
    @athanasioszisopoulos387 5 месяцев назад

    Oh my god, that was great, thank you!

  • @spen2431
    @spen2431 11 месяцев назад +1

    A great refresher... thanks Shane 💥💥

    • @ShanesCows
      @ShanesCows  11 месяцев назад

      Happy to help. Have a great day. 🐶

  • @isabelaramalho3112
    @isabelaramalho3112 2 месяца назад +1

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

  • @dougydoe
    @dougydoe 11 месяцев назад +1

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

    • @ShanesCows
      @ShanesCows  11 месяцев назад

      Happy to help. Have a great day. 🐶

  • @THEDTSMAN
    @THEDTSMAN 11 месяцев назад +1

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

  • @HumanityFirst24
    @HumanityFirst24 10 месяцев назад +1

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

    • @ShanesCows
      @ShanesCows  10 месяцев назад

      Glad it was helpful!

  • @thrilled2bits
    @thrilled2bits 11 месяцев назад +1

    Excellent vid, Shane. Appreciate it.

  • @oluwatobipaul6171
    @oluwatobipaul6171 10 месяцев назад +1

    Thank you Shane Young for the refresher on delegation

  • @franknielsen3219
    @franknielsen3219 11 месяцев назад +1

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

    • @ShanesCows
      @ShanesCows  11 месяцев назад +1

      Looking forward to having you Frank. 😎

  • @atehaa
    @atehaa 5 месяцев назад +1

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

  • @davidjimenez8952
    @davidjimenez8952 10 месяцев назад +1

    Master class again. top!

    • @ShanesCows
      @ShanesCows  10 месяцев назад

      Thank you! Cheers!

  • @joelsnellman1729
    @joelsnellman1729 11 месяцев назад +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!

  • @jjpk80
    @jjpk80 11 месяцев назад +1

    Excellent explanation.

  • @Anenah
    @Anenah 11 месяцев назад +1

    Thanks!

    • @ShanesCows
      @ShanesCows  11 месяцев назад

      Thank you for the support. 😎

  • @davediguer4770
    @davediguer4770 4 месяца назад +1

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

    • @ShanesCows
      @ShanesCows  4 месяца назад

      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. ruclips.net/video/iG8SjWtX1yM/видео.html

  • @TheKermit2110
    @TheKermit2110 11 месяцев назад +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  11 месяцев назад +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. ruclips.net/video/lYi24okXDPs/видео.html

  • @blairforbes1132
    @blairforbes1132 11 месяцев назад +5

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

    • @ShanesCows
      @ShanesCows  11 месяцев назад +1

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

  • @robofski
    @robofski 11 месяцев назад +1

    Really well explained, I finally understand delegation 😂

  • @islamezz5019
    @islamezz5019 3 месяца назад

    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.

  • @ItsGravix
    @ItsGravix 5 месяцев назад +1

    Lol I wish I had more teachers like you !!

  • @MrPaulpierce34
    @MrPaulpierce34 10 месяцев назад +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  10 месяцев назад

      Yes. This video will help on partial delegation like you are thinking about ruclips.net/video/iG8SjWtX1yM/видео.html

  • @timwalter6989
    @timwalter6989 11 месяцев назад +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  11 месяцев назад

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

    • @caraziegel7652
      @caraziegel7652 11 месяцев назад +1

      @@ShanesCows i like 'These guys!' lol

  • @firmhand
    @firmhand 11 месяцев назад +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

  • @1culcat
    @1culcat 7 месяцев назад +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  7 месяцев назад +1

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

  • @martinc3907
    @martinc3907 4 месяца назад +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.

  • @piotrrusak
    @piotrrusak 11 месяцев назад

    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 11 месяцев назад

      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 11 месяцев назад

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

  • @davidallard9913
    @davidallard9913 11 месяцев назад +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  11 месяцев назад +1

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

  • @ceyloncitizen8740
    @ceyloncitizen8740 11 месяцев назад +2

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

    • @ShanesCows
      @ShanesCows  11 месяцев назад

      Glad to help. 😀

  • @Perfektionist
    @Perfektionist 11 месяцев назад +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  11 месяцев назад

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

  • @aaron6516
    @aaron6516 11 месяцев назад +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  11 месяцев назад

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

  • @funkycowie
    @funkycowie 3 месяца назад +1

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

    • @ShanesCows
      @ShanesCows  3 месяца назад

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

  • @villagefood1179
    @villagefood1179 11 месяцев назад +1

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

  • @MultiMinhgiang
    @MultiMinhgiang 11 месяцев назад +1

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

    • @ShanesCows
      @ShanesCows  11 месяцев назад

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

  • @felixverduin569
    @felixverduin569 11 месяцев назад +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  11 месяцев назад

      Great minds think alike 😎

  • @Andyandrwew144
    @Andyandrwew144 11 месяцев назад +2

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

  • @austinstern
    @austinstern 11 месяцев назад +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

  • @ABCD-ABCDEFGH
    @ABCD-ABCDEFGH 11 месяцев назад +1

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

    • @ShanesCows
      @ShanesCows  11 месяцев назад

      This one. ruclips.net/video/lYi24okXDPs/видео.html

  • @ResponsibleXI
    @ResponsibleXI 11 месяцев назад +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 11 месяцев назад +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 11 месяцев назад +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  11 месяцев назад

      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 11 месяцев назад

      Thank you!

  • @MrKhulaid
    @MrKhulaid 5 месяцев назад +1

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

    • @ShanesCows
      @ShanesCows  5 месяцев назад +1

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

    • @MrKhulaid
      @MrKhulaid 5 месяцев назад

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

  • @jeanpierreragequit1726
    @jeanpierreragequit1726 11 месяцев назад +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 !!!

    • @ShanesCows
      @ShanesCows  11 месяцев назад

      Awesome. Glad it helped.

  • @michelhegeraat5430
    @michelhegeraat5430 11 месяцев назад

    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 11 месяцев назад +1

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

    • @caraziegel7652
      @caraziegel7652 11 месяцев назад +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 11 месяцев назад +2

      @@caraziegel7652 the position thing was very annoying.

    • @ShanesCows
      @ShanesCows  11 месяцев назад

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

    • @shud7101
      @shud7101 11 месяцев назад

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

  • @jefflund5685
    @jefflund5685 11 месяцев назад +1

    Woot! First!

  • @davidgraf8012
    @davidgraf8012 9 месяцев назад +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  9 месяцев назад

      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. :)

  • @user-hy2gk6qz1r
    @user-hy2gk6qz1r 11 месяцев назад +1

    Hey Shane. There is a work around provided here: ruclips.net/video/QNSRKpyIHPg/видео.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  11 месяцев назад

      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. :)

  • @kehindeakiode2865
    @kehindeakiode2865 11 месяцев назад +1

    First to like

  • @rlogborn
    @rlogborn 11 месяцев назад +1

    2000 - meh!

    • @ShanesCows
      @ShanesCows  11 месяцев назад

      No one loves that number.

  • @wcait8303
    @wcait8303 2 месяца назад +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  2 месяца назад

      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. ruclips.net/video/iG8SjWtX1yM/видео.html