DELEGATION in Power Apps | Must Know to build efficient Apps

Поділитися
Вставка
  • Опубліковано 23 лип 2024
  • In this Power Apps tutorial video, we will dive deep into the KEY concept of DELEGATION in Power Apps that every App developer needs to understand for building efficient and performant applications. Working with large data sets requires using data sources and formulas that can be delegated and hence it's important to understand differences between delegable and non-delegable queries against different data sources. Key is to write Power Apps formulas that support delegation against delegable data sources like SharePoint, Dataverse, SQL.
    We will learn how delegation works to minimize the amount of data that must be brought to your device. Delegation is where Power Apps will delegate the processing of data to the data source, rather than moving the data to the app for processing it locally.
    We will explore how a Gallery loads data from a large data source in batches when delegable queries are performed (optimized loading of data), understand the network calls in play using Monitor, learn about PowerApps "data row limit" (500 - 2000 data row limit), learn how to write delegable formulas to work with large data sets, learn how collections, variables etc. work when delegation is in play, learn how certain formulas may not display a delegation warning and much more..
    This video is a must-watch for anyone looking to deep dive into Power Apps DELEGATION - A key concept that every Power App Maker, whether a beginner or an expert, must be aware of.
    #PowerApps #PowerPlatform #canvasapps
    🔗 Understand delegation in a canvas app
    learn.microsoft.com/en-us/pow...
    🔗 Learn more about Power Apps Delegation and ways to overcome delegation
    • Power Apps Delegation ...
    Table of Contents:
    00:00 - Introduction to delegation in Power Apps
    00:30 - What is delegation?
    01:19 - Delegation in action with large data source (SharePoint List)
    02:15 - Gallery optimized loading of data
    03:35 - Which data sources and queries support Delegation?
    04:35 - Data row limit for Non-delegable query
    06:52 - How to identify delegation warnings in your Power App?
    07:42 - Write delegable queries in Power Apps
    09:26 - Hidden delegation challenges - Watch out
    10:45 - Partial delegation with Collections and Variables
    12:34 - Must Know about delegation
  • Наука та технологія

КОМЕНТАРІ • 109

  • @nickc655
    @nickc655 5 місяців тому +3

    Yet another awesome video Reza. Thank you so much!

  • @lpm76
    @lpm76 2 місяці тому +3

    The advice to stich together collections to load large data sets is probably the most shared (bad) advice in the community. Thank you for making such an excellent video that highlights this.

    • @RezaDorrani
      @RezaDorrani  2 місяці тому +1

      I couldn't agree more. What surprises me is that folks are using those techniques to avoid delegation.

    • @lpm76
      @lpm76 2 місяці тому

      ​@@RezaDorrani I think it is because delegation is sometimes explained as the maximum number of rows PowerApps is able to work with, which is not true at all!
      A better explanation would be: It is the maximum number of rows it SHOULD work with, but LOCALLY and not server side.
      The example where you scrolled to the second page of your dataset showed this so beautifully together with the row count. It showed that when you respect delegation, PowerApps will actually help you paginate your dataset and ensure you still get the correct result from your queries. I mean how nice is that?! You don't even have to do anything; Power Apps just handles it for you.
      I stitched together collections in the beginning because I read bad advice and the worst thing about it, is that it kinda works; it performs badly, but it gets the job done.
      It was only later until I learned about delegation from gurus like you and Shane, that I understood my approach was severely flawed, and that by understanding delegation I realized that it makes my life much easier.
      I simply didn't understand that PowerApps could filter 1.000.000 rows server side trough delegable queries, but still be limited to only show 500/2000 rows locally. But it makes sense when you think about as you said, that the whole system is in place to urge you to minimize the amount of traffic between the app and the server.
      I still have many apps where the delegation is set to 2000 rows, but when you think about, how often do you really need to present more than 500 records to the user at the same time? Probably never. And how many apps have tables with more than 500 records? Probably all of them.
      Delegation works brilliantly when you understand it, and that's why I wanted to show my appreciation for your work Reza, because your video can improve the whole Power Apps community in a place where it is most needed.

  • @mikemorrison1931
    @mikemorrison1931 5 місяців тому +2

    That testing tip for setting return query to "1" row was awesome!

  • @dougydoe
    @dougydoe 5 місяців тому

    A really good refresher course on this all important topic. Hopefully, a few more functions will become delegable soon. Thanks for sharing. Appreciated.

  • @KartheekReddy5
    @KartheekReddy5 5 місяців тому

    Great Video as usual. Thanks for the Info

  • @hamytube
    @hamytube 5 місяців тому

    Thank you @Reza, for another excellent and informative video . Tons of thanks. 👍

  • @bwebmasta1
    @bwebmasta1 4 місяці тому

    Great video as usual, very informative!

  • @KaiWeissmann
    @KaiWeissmann 5 місяців тому +1

    Thanks for this great overview of Delegation!

  • @raslaankhan5146
    @raslaankhan5146 5 місяців тому +1

    Thank you for a refresher!!!

  • @HazzR8
    @HazzR8 Місяць тому +1

    Well explained and to the point. Thanks

  • @shubhamkoolwal139
    @shubhamkoolwal139 2 місяці тому +1

    informative and well explained with example...

  • @josephcarlos8463
    @josephcarlos8463 5 місяців тому

    Dude you are amazing. I learn best from examples like you show. Thank you so much.
    The Superbowl is on right now and I'm learning from your video. I'm learning here to
    advance my personal power, otherwise I would be wasting time. Thanks :)

    • @josephcarlos8463
      @josephcarlos8463 5 місяців тому

      BTW what version are your currently using?

    • @RezaDorrani
      @RezaDorrani  5 місяців тому

      Thanks so much!
      Enjoy the super bowl.

    • @RezaDorrani
      @RezaDorrani  5 місяців тому

      version of?

  • @vigneswarikrishnakumar5895
    @vigneswarikrishnakumar5895 5 місяців тому +1

    Well explained Reza. This really helps.

  • @oluwatobiyusuf
    @oluwatobiyusuf 3 місяці тому +1

    Thank you another amazing video, Reza

  • @shaikhfirdos2723
    @shaikhfirdos2723 5 місяців тому

    Amazing tips as always ❤❤ Thanks Reza

  • @user-de2kl6mh9k
    @user-de2kl6mh9k 5 місяців тому +1

    Thank you for this useful reminder

  • @victorconnan6282
    @victorconnan6282 5 місяців тому

    Great video as always! I saw in documentation the 'in' Fonction is delegable in dataverse but I try to filter a gallery on a multi choices column and get delegation warning. Does a workaround exists? I try addcolumn(concat to filter on string but performance is not great because the app needs to collect the whole table.

    • @RezaDorrani
      @RezaDorrani  5 місяців тому

      in is delegable for certain data types not all. Check documentation.

  • @tausifshaikh312
    @tausifshaikh312 4 місяці тому

    It's been great Reza sir if you post on your experienced basis,scenario based interview questions its been really helpful for us
    You are Gem 💎💎 for us
    Regards

    • @RezaDorrani
      @RezaDorrani  4 місяці тому

      That is not an area I am well aware of.

  • @bestyapper
    @bestyapper 5 місяців тому +2

    Awesome video Reza. In regards to collection, one of my client keeps insisting that we load 6k to 8k into a collection and I have to use concurrent function. Takes about 30 secs and the app's performance is slightly worse, not App breaking but not as nice at all.

    • @RezaDorrani
      @RezaDorrani  5 місяців тому +1

      Loading > 2k records is not advisable. Performance will take a hit.

  • @djpowerage
    @djpowerage 5 місяців тому +1

    Thanks!

  • @nirjasmuhammed
    @nirjasmuhammed 5 місяців тому +2

    if the function is non delegable then the intellisense should be showing the delegation warning,..... surprised to know the issue with ' with ' function ... thanks for this amazing video sir............

    • @RezaDorrani
      @RezaDorrani  5 місяців тому +1

      I agree that the warning must be shown. I will take that feedback to the team.

    • @MuFeR.
      @MuFeR. 5 місяців тому +1

      "With" not having a warning is expected in the example shown at ~10:40, it would be the same as if you did
      1) ClearCollect(colStudentData, Students),
      2) Filter(colStudentData, Region.Value "South") (no delegation)

    • @DavidAdediran
      @DavidAdediran 5 місяців тому

      ​@@MuFeR. I agree. Delegation warnings should only be for functions that is expected to work in the data source. With is a purely Power Apps function that can not be delegated. So a warning is misleading.

  • @adityapadmawar8754
    @adityapadmawar8754 5 місяців тому +1

    Very well explained Reza sir! Thanks for creating this video. I have seen Power Apps slowing down with 1000 rows in SP list. What is the best or recommended source/backend for any Power App?

    • @RezaDorrani
      @RezaDorrani  5 місяців тому

      Thanks!
      There is no single answer to best data source. Answer is "it depends". I deep dived into this concept during the LIVE training workshops.

    • @adityapadmawar8754
      @adityapadmawar8754 5 місяців тому

      @@RezaDorrani Okay..thanks

  • @michelelomonaco5118
    @michelelomonaco5118 2 місяці тому

    Good morning Reza,
    I have a sharepoint table with 2 columns, the first: ID_PARENT is numeric and the second PROJECT is a text and contains 8500 records.
    If I use the Filter(StartsWith(PROJECT,"PROJECT001")) function I get all the records of PROJECT001, if instead I use the Filter(StartsWith(ID_PARENT, 10)) function I get only the data that are in the first 2000 records. Maybe the problem is that you can't use StartsWith with numeric fields? Thank you.

  • @TheKermit2110
    @TheKermit2110 26 днів тому +1

    VITAL! Thanks Reza!

  • @ManojShukla31
    @ManojShukla31 3 місяці тому +1

    Hello Reza, It's again a nice video. I have question regarding delegation. I set delegation limit to 2000 (that is max limit) in this case if my search result crosses the limit i would get only 2000 records, how do i get rest data which couildn't come beacuase of limit.

    • @RezaDorrani
      @RezaDorrani  3 місяці тому

      Welcome!
      Thats the limitation if your query is not delegable. Better not to use search function and use StartsWith in that scenario.

  • @udayreddy2605
    @udayreddy2605 5 місяців тому

    Hi Reza,
    Thanks for this video. Really Helpful. Quick Question:
    I am working with around 0.5 Million rows SQL table. On this table we need to perform a group by operation and create landing page and for slicers we need to perform a distinct on column and get all different values from that column. The challenge here now is Group by & Distinct are non delegable Power Fx functions when connected to a SQL connector. There is no way that I can found to do this with other delegable functions.
    How do we approach this problem now?

    • @adarshmc8158
      @adarshmc8158 5 місяців тому

      Create sql views

    • @RezaDorrani
      @RezaDorrani  5 місяців тому +1

      Table shaping functions are not delegable.
      Sql views may be an option

    • @udayreddy2605
      @udayreddy2605 5 місяців тому

      ​@@adarshmc8158 @RezaDorrani - Thanks for the idea, I can create a sql view for group by post which also I will end up with a table greater than 2000 rows, On this table if I am using distinct its still an issue as it picks up the values from only first 2000 rows and I end up not having all unique values from my column. Anny idea on how do I tackle this after creating Views. Thanks in Advance

  • @JohnHall
    @JohnHall 5 місяців тому +1

    1) Don't trust the warnings for delegation (either that they do or don't show as delegable)
    2) Delegation ONLY becomes an issue for your apps if the dataset gets large (>500 or >2000 once you change the defaults).
    3) You can test to see if you have some delegation issues by setting an abnormally low query limit for your app (down from 500 to a smaller #)
    4) All Delegation issues can be solved through better queries, better data organization, using Power Automate & ParseJSON, etc. (which all mean Dataverse isn't required to solve delegation issues in most scenarios)
    5) Microsoft is likely to push better delegation features within Dataverse first (but that doesn't mean you should use Dataverse unless your app requires it or your organization is focused on supporting Dataverse more widely)

  • @MrLuizclaudio09
    @MrLuizclaudio09 5 місяців тому

    1:13 Very Good

  • @tonya3308
    @tonya3308 3 місяці тому

    Great videos! Do you know how to turn the Comments off when using the Edit mode in PowerApps?

    • @RezaDorrani
      @RezaDorrani  3 місяці тому

      I am not aware as I have not come across anyone wanting to turn it off. Check documentation and see if there is something provided for it.

  • @ABCD-ABCDEFGH
    @ABCD-ABCDEFGH 5 місяців тому

    So it’s not a good idea to load sharpoint data in collections and use collections as data source? Should we connect to SharePoint data source directly if your records are more than 2k?

    • @RezaDorrani
      @RezaDorrani  5 місяців тому +2

      Collection is not a data source. It is only a space to temporarily load data for the users session. Best to connect directly to data sources.

  • @dhavalbendale5509
    @dhavalbendale5509 5 місяців тому

    Hey Reza, can you pleaseeee let me know how to get the attachments through ms forms. Setting is disabled for external users, but i need it anyhow to put the documents as attachments in the saem list item created by form submitted. Please Help!!!

    • @RezaDorrani
      @RezaDorrani  5 місяців тому +1

      I have done videos on it.
      Ms forms anonymous users - there is no option for attachments.
      If setting is disabled - there is no other option that Im aware of.

    • @dhavalbendale5509
      @dhavalbendale5509 5 місяців тому

      Thanks for swift reply. But can you pleasee let me know any other options but ms forms to get the responses as well as attachments from external organisations into our sharepoint.

    • @RezaDorrani
      @RezaDorrani  5 місяців тому

      @@dhavalbendale5509 Im not aware of other options.

  • @user-bo4qe9ww5n
    @user-bo4qe9ww5n 4 місяці тому

    Thanks for this great video. Very Helpful!! May we use Power Automate to bring more than 2000 items to Power Apps and keep them into a collection? Using Get Items action?

    • @RezaDorrani
      @RezaDorrani  4 місяці тому

      Welcome!
      Delegation over anything. Why do you need to load 2000 records in collection via flow?

    • @user-bo4qe9ww5n
      @user-bo4qe9ww5n 4 місяці тому

      To avoid the delegation issue. I understand we should not work with large local collections but, sometimes, it can help when you need to use non delegable queries as CountRows or Distinct and the number of records are, e.g., between 1 and 10000 (no more).

    • @RezaDorrani
      @RezaDorrani  4 місяці тому

      @@user-bo4qe9ww5n I would not recommend doing that as it will have performance implications. Thats why one has to use better data sources like Dataverse that offers max flexibility in terms of delegation and more.

  • @kevindibb6534
    @kevindibb6534 Місяць тому

    I have a SQL (Synapse) datasource with about 60,000 records. What's the best way to work with this?

  • @annisamegarestya8800
    @annisamegarestya8800 3 місяці тому

    Hi Reza, If I want to make an app that can connect Dataverse and Web Apps, Can we make a connection between them?

    • @RezaDorrani
      @RezaDorrani  3 місяці тому

      Whats web apps?
      Power apps can connect to multiple data sources.

    • @annisamegarestya8800
      @annisamegarestya8800 3 місяці тому

      @@RezaDorrani Can we input data from a web (HTML, CSS, JavaScript) to a dataverse?

    • @RezaDorrani
      @RezaDorrani  3 місяці тому

      @@annisamegarestya8800 Not that I am aware of

  • @balaji830
    @balaji830 4 місяці тому

    I have a really large list with about 90K records. Filter and StartsWith does not show any records. I don't see any delegation warning but no results either. To be precise, it is very errant in showing results. Sometimes I see results and sometimes I don't even when I know there are records that start with the term provided.

    • @RezaDorrani
      @RezaDorrani  4 місяці тому

      Depends upon the query you have framed. I have not come across any issues with lists > 500k records as well. I recommend posting your issue/query with screenshots on the forums at powerusers.microsoft.com

  • @malikhan0123
    @malikhan0123 5 місяців тому

    CAN we show more than 2k line items in gallery, gallery is delegable or not

    • @RezaDorrani
      @RezaDorrani  5 місяців тому

      Thats what the video explains. If query is delegable and you keep scrolling down, gallery will keep loading all the data.

    • @malikhan0123
      @malikhan0123 5 місяців тому

      @@RezaDorrani i mean can it load after 2k line items..it would be good if you shown that in video

    • @RezaDorrani
      @RezaDorrani  5 місяців тому +3

      @@malikhan0123 Try it out and see. It will load as many as you need.
      I dont see any user doing that though as scrolling to get data to find is not ideal. Better to have good filters on screen.

  • @ankithguptha5184
    @ankithguptha5184 5 місяців тому

    How to upload multiple files to dataverse record and save it to share point doc library.And send notification email to user in that particular dataverse record with multiple documents attached in the email

    • @RezaDorrani
      @RezaDorrani  5 місяців тому

      I do not have a video reference on this scenario and would have to try it out to provide guidance. I recommend checking or posting your query on forums in case someone has done something similar powerusers.microsoft.com

  • @jeevithaelango671
    @jeevithaelango671 2 місяці тому

    Hi Reza, can you please help me to load more than 6000 records in powerapps

    • @RezaDorrani
      @RezaDorrani  2 місяці тому

      If you keep scrolling in gallery it will load as many as you need

  • @NimbusBI
    @NimbusBI Місяць тому

    how to handle countrows function under a filter query?
    like:
    CountRows(Filter(datasource,logic)) > 10

    • @RezaDorrani
      @RezaDorrani  Місяць тому

      Countrows is not a delegate function unless you use dataverse (limits are documented)

    • @NimbusBI
      @NimbusBI Місяць тому

      @@RezaDorrani On a text propert of a label, I write " CountRows(Filter(Temp_Item_Selection, Dealer_Code = "Cust0001")) " this code.
      And it shows delegation warning.
      Warning massage : The highlighted part of this formula might not work correctly on large data sets. The “CountRows” operation is not supported by this connector.
      We use sql server as connector

    • @NimbusBI
      @NimbusBI Місяць тому

      @@RezaDorrani I write a query like " CountRows(Filter(TestDB,VendId = "Vend001")) " on a text property of a label.
      But i found this warning massage.
      The highlighted part of this formula might not work correctly on large data sets. The “CountRows” operation is not supported by this connector.
      We use sql server as connector

    • @RezaDorrani
      @RezaDorrani  Місяць тому

      @@NimbusBI CountRows is not delegable with sql either. Check documentation to see what’s supported for delegation for your data source.

  • @KrishnaKumari-tr2vi
    @KrishnaKumari-tr2vi 5 місяців тому

    😢😢😢😢😢

  • @KrishnaKumari-tr2vi
    @KrishnaKumari-tr2vi 5 місяців тому

    V। ❤❤❤❤❤😂😂

  • @KrishnaKumari-tr2vi
    @KrishnaKumari-tr2vi 5 місяців тому

    Ko