Top 25 Power Apps Tips, Tricks & Best Practices for Makers

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello everyone in this video I will cover 25 tips tricks and best practices for powerapps specifically focused around app makers so let's check it out in action [Music] you can start with a blank app and connect to your data sources or you can pick from some of the most popular data source options and selecting the right data source is a key decision that needs to be made up front SharePoint lists or Microsoft list versus dataverse there are some key considerations and differences between these data sources what type of data are you trying to support relational non-relational understand capacity limitations of your data source understand security concepts of your data source and in powerapps you are not limited to one data source you are free to connect to multiple data sources of your choice when you connect to a specific data source for example if I search for SQL it's important to keep in mind that certain data sources require premium licensing SQL is a premium connector and that is clearly highlighted in the select a data source experience itself SharePoint as an example is a standard connector if you go to the details of your power app the license designation property will let you know if this app has been designated as a premium licensed app every user accessing the PowerApp will require a premium license and being informed about the license that is designated to your account under settings we have the option for plans this will highlight the licenses that your account has access to here in a different tenant I own the per user license plan which is the premium license plan now as we can mix and match data from multiple data sources or create multiple connections to the same data source as an app maker I need to understand that there are certain recommendations around performance of canvas powerapps one of the recommendations is to limit the number of data connections don't add more than 30 Connections in one app for this PowerApp 8 connections I have made even though I'm connecting to the same data source like SharePoint as an example here all of these connections are considered as separate connections because they are connecting to different lists one good story around this scenario was where Microsoft HR uses the Power Platform to transform employee experiences this app called as Thrive is the Home app where the employee experience begins from employees can launch other power apps for example view the global holiday calendar or create vocation requests or give kudos all of these are independent power apps and the key is that the apps deep link into each other and can be launched directly from the web experiences to launch a different Power app I can insert a button control leave request on select I will leverage the launch function to launch my specific PowerApp when the user selects this button it will straight out launch that specific PowerApp powerapps coding standards and guidelines that shares information around best practices like naming conventions for controls code optimization techniques and a lot more foreign s are just named randomly best practice is to follow a naming standard as an example for button controls follow an abbreviation for it like bdn so this control of mine which is launching let's say my finance application I can rename this to BTN finance app and if I start following this naming standard throughout my app if I want to search for certain aspects of my power app and think about this from a maintainability standpoint as well search for bdn all of those button controls that I have named accordingly will show up in the search experience compare the naming standards of this screen versus a similar screen experience but this time with controls named following the guidelines for my header section I can clearly look at the naming of the control itself and understand the action that that control would potentially take this is an icon control that would generate a PDF of the screen comment your code very important from a maintainability standpoint on select of this button I have the formula that does The Following for the formula bar the first part is to make it readable and we have this option called format text if I select this it will automatically format all the formulas in this formula bar for commenting put double forward slash here I can add a line command and I can do the same for other formulas to write a block of commands you can use forward slash star slash to write formulas in the formula bar as we start typing intellisense will provide the formulas that are available based upon the input that we've provided for example here there is a function called lookup however we have this powerfx option available which if you click on you can browse through all the available functions that are provided you can select the function and it will describe what that function specifically does text based functions date time based functions information functions and a lot more for any of these functions that you select there is a link to learn more if you click this it will take you to the documentation for the powerfx formula reference and this documentation has all the formulas listed out from a through z and if I select a specific alphabet it will list out all the formulas related to that let's take an example of concatenate function if I select this it will provide a lot more details about that function it syntax how can I use it with examples that you can go and try out new formulas and features keep getting added to the powerapps studio experience one of the new formulas is known as the PDF function that allows us to generate a PDF of a screen a gallery or a container control now keep up to date with new features and formulas under settings if you go to support you have the authoring version for your PowerApp this normally is the recommended version which is the most stable recent version that has been released if you go to see all powerapps versions it will take you to the documentation around released versions for powerapps here you can pick your region and pick the specific version I can see what was documented as part of that specific version's release plus you can look at the released planner for Power Platform I can look at what's planned what dates are they supposed to go ga generally available what features are coming soon what new features are available for me to try out canvas apps allow us to build Pixel Perfect apps here I have a screen where I've added certain set of standard controls that same screen is what I have changed to this experience we have a standard set of themes that are provided for us that we can Leverage currently there is no option to create custom themes the center of excellence toolkit has a theming component which has a theme editor PowerApp where you can Define the theme of your app and then you can export that theme and leverage that sample app file to create your new apps so that you have a standard branding theme to begin with forward apps has an html text control this I have leveraged to create background gradient and box Shadow effect and this I have done by leveraging simple HTML plus if you need UI inspiration I typically go to dribble this specific dashboard interface is what I leveraged to Showcase my total ticket count and the different statuses here's another design that shows list data this design is what I replicated for my gallery control there are also designs that have multiple screens and a similar experience is what I tried to create in my PowerApp if you are running your app in the web browser experience and you do not want the top nav bar if you simply add nav bar is equal to true this will go and hide the top navigation bar for power apps that are built in dataverse for teams here the controls Leverage The Modern fluent controls you can actually copy them head over to your powerapps and paste that control right here so now I get this modern calendar experience directly in my canvas Studio we have the ability to create components these can be local components meaning they are local to the power app or these can be Global components by creating them inside a component Library here I have a component library that has various components dialogue a bar component left navigation component and more when components was announced there were 10 reusable components that were provided for us to get started with and some of these components is what I have leveraged in my components Library the Creator kit has a common set of components that you can take advantage of navigation grid controls pop-ups and more I've created a screen I need a header I'll go to add go and get components from component libraries select the components that I need click import those components will line up under Library components now all the maker has to do is just select it and start configuring it here is a header control where I can provide the text for my header as an input property it already shows the current logged in user's image for the app logo I can upload an image to my app I already have one I can simply go and connect to that I need a left navigation I pick left navigation and here is a nice left navigation component for me to begin with these are all configurable I will give this a background color there is a nav items property where I can Define the navigation items and my component will automatically reflect the change and on similar lines I am free to add my dialog control component okay each component and a lot more delegation is the ability for the power app to delegate the work of Performing the query to the underlying data source working with large data sets requires your data sources to be delegable in powerapps under settings in the general tab we have the data role limit that has been defined by default that number is 500 it can be expanded to 2000 you cannot go one beyond that this number basically means that if the query that is being performed by powerapps if that is not delegable at that moment powerapps has to do the work and if powerapps has to do the work for that query it would be limited to a small data set only the data sources that currently support delegation are as follows which also means it's extremely important to pick a data source that is delegable if you are working on scenarios or solutions that require large data and for each of these delegable data sources the documentation clearly defines which actions are delegable and against which column types they are delegable in this power app I have a SharePoint list called students that's connected which has over 5000 records in the SharePoint list I have a gallery the items property for which is that specific students list now this technically is a query select star from my students list the list has over 5000 items but if you keep an eye out on the gallery account it says a hundred and as the user starts scrolling to the bottom of the gallery powerapps will load data in batches of 100. track the behavior of how this works under Advanced tools there is a monitor tool that helps monitor activity within your app to understand performance and identify bugs or bottlenecks here as I start scrolling down to the last item of the gallery it will load data in batches of 100 so the monitor experience will actually show you those queries that are being performed the request that is being made and the response that is being received it's a great way to track and monitor how many queries back and forth is your power app making I have a text box here and let's say I would like to change this query to search in my students list the text in that search text box is in the title column of my SharePoint list now observe the moment I do that I get these two blue lines that state that there is a delegation warning in my formula you will observe how my gallery has loaded 500 records and nothing Beyond and if I was to perform a search operation powerapps will only search within that defined data set even though my SharePoint list has over 5000 items powerapps will not perform that search always keep an eye out for delegation warnings the app Checker under formulas will clearly highlight any of those delegation warnings the recommendation is to not add more than 500 controls in your app reason being powerapps generates an HTML Dom object for each control that you render on your screen I have added five button controls and imagine this is my navigation for my power app and I intend to build 10 screens so that's 50 controls just in my power apps to drive the navigation aspect the same experience I can also create by leveraging a gallery control in which I can add a button control and for the items property of the gallery I'll simply provide an array of five names and for the button controls text property I will use this item.value so as you can see it's generated the same output of creating five buttons anytime you repeat certain things over and over again you have to think about galleries here I am leveraging two controls which is a gallery control and a button control that replaces an experience of creating five buttons in this power up my left navigation is a component and this component leverages that same concept of a gallery purely because I wanted to repeat the menu pattern over and over again dynamically depending upon tabular data that the user provides to build out that specific menu here's another example of where I've leveraged gallery and a button to create multiple button controls or to create a tablet like interface powerapps as a function called onstart which is the first function that gets called when the user starts or loads the app if your app takes a lot of time to load take a look at the number of actions that you have incorporated in onstart here you need to be careful about over using variables or over using collections because the more logic you add to load data into collections the more time the app is going to take to load all that data locally one function that you can take advantage of specifically an app onstart is the concurrent function which allows us to run actions concurrently I have a certain set of functions button executes sequentially and here I'm executing those same set of functions in a concurrent manner by simply decorating my function calls in a concurrent function the same technique is what I have leveraged in app on start here I'm creating a collection to drive the menu of my power app I know the app menu is not going to change during the course of the user leveraging the PowerApp any branding aspects related to my power app I can store them in a variable another common aspect is querying Office 365 users get me the current logged in users manager now if you need the details of a user's manager over and over again throughout your app you do not want to keep repeating that formula better option is to store it in a variable up front so you can leverage it throughout the course of that specific app session another thing to always keep an eye out on is the app checker here under performance you can see the different warnings unused variables so if I select this it will let me know that there's a specific variable here that I have not used if I go to search and search for that specific variable I can see that I've set this variable on app onstart but I've never used it so I can simply just go and comment this out or remove this unused media files under media if I go to three ellipses there's an option to remove any of the media files that is not being leveraged anywhere in this specific power app if the current logged in user is not Reza then show this variable else hide this variable now this condition itself is going to result in a Boolean value which is true or false adding this extra if condition to it can also impact performance powerapps has to evaluate this function if then it will evaluate the condition and then it will go and apply the necessary true or false value that you've defined if I replace this function simply with my condition itself the output would still be the same because this function will return a Boolean value resetting controls here I have four controls that I would like to reset and the standard pattern we apply is this reset Ctrl 1 reset Ctrl 2 Ctrl 3 and reset Ctrl 4. so if I was to enter data and click reset they will all go back to their original values a faster way to do this would be as follows when the reset button is clicked I will set a variable called VAR reset to false and then I will set that same variable back to true I can hold the Ctrl key and select all my controls that I would like to reset in one go with all of these controls selected I will search for their reset property and change all of them in one go to VAR reset now if I have filled data and if I click reset the experience would be same but if you notice the formula is a lot cleaner to maintain and manage now rather than writing all these nested if else conditions I can simply change this entire function to a switch condition by using the formula switch that variable if that variable is new show new data if that variable is pending show waiting for approval so the output is the same but the formula is a lot more efficient since it's not doing all these nested fl's calculations repeated formulas here is an example of a label where I would like to show the current logged in users manager's name and their email address I am querying the Office 365 users connection to go and get the user's manager information and this I'm doing two times right here in the same formula I can leverage the width function to create a scoped variable I'll call the scope manager I will perform the query to get the user's manager close the scope and for the formula I can simply use this scoped variable to get the display name and to get the mail now observe the output is the same but the formula is ensuring that I'm querying Office 365 users only once to get the user's manager and then from that object I am fetching the display name and the mail a classic example is a gallery that is connected to a form control when I select an item in the gallery the form control showcases that specific data and the way we do this is for the form controls item property we leverage Gallery dot selected this Gallery is living in a different screen when dependent formulas are plugged in powerapps would load both to the screens and memory at the same time and that impacts performance a better option is to use variables when I select this button to take me to that specific screen I can set a variable let's call it where item and I will save the current context of the gallery item to this variable for the form controls item property I can simply leverage that variable and now the behavior is exactly the same but there is no control dependency in this Gallery control I have a label control that performs a lookup which is also a query against the data source it's a separate list in SharePoint that's being queried so I can go and grab information from this list where the title column matches the current gallery items class name now this is a very expensive operation purely because a gallery will show multiple records and for each of these records a query will be performed against my data source this list which is called my class list if I can cache this data set directly in my power app which I could do directly on the onstart of my power app where I'm querying the data source now instead of this I will simply perform that same query but against my local collection so this will be a lot more performant if you have a gallery within a gallery you need to be even more careful because then you're getting into multiple scenarios where such challenges could come into play version notes whenever you make a change to your power app and you go to save with version nodes these version notes are optional but they could be extremely handy in tracking what changes were made from the previous version for example let's say in this scenario I made modifications to the header component of my app if I add that as the version node and Save for that power app if I head over to details and versions that version node is what I can see right here so when I'm reverting to a specific version or if I would like to see a historical series of notes as to what changes were made this is extremely handy another key tip is to publish your apps regularly if you go to the app version history if I go to see more options for version management here I have the ability to revert to a previous version but the key thing is it's only possible to restore app versions that were created in the last six months so if I go prior to six months notice I'm not able to restore that specific version if you enjoyed this video then do like comment and subscribe to my YouTube channel and thank you so much for watching
Info
Channel: Reza Dorrani
Views: 57,822
Rating: undefined out of 5
Keywords: powerapps tips and tricks, powerapps tips, power apps, powerapps, microsoft power apps, powerapps best practices, tips and tricks, best practices, powerapps for beginners, powerapps tutorial, powerapps tutorial for beginners, power apps beginner, reza dorrani, powerapps data source, powerapps for makers, makers, powerapps design ideas, powerapps design examples, power apps performance optimization, tutorial, how to, delegation, top, power apps beginner tutorial, power fx, formulas
Id: DJFNglsGQ3k
Channel Id: undefined
Length: 26min 56sec (1616 seconds)
Published: Mon Nov 14 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.