Here is what we learned developing multiple production-ready PowerApp Applications!
Published in
4 min readDec 5, 2022
Designing Screens
- Keep the number of screens between 8–10. If you need to have a greater number of screens in an application then break down your workflow/modules in multiple applications and use Launch() and Param() functions to connect these applications. And on each screen, limit the number of controls from 40–60(If there is a form control on screen then controls within the form should be counted as well).
Example: If you have an application that spans different Departments/Management Levels of your organization, divide the workflows and Screens according to Departments/Management Levels. So that one single application can handle only some of the load. - Use variables to transition data/values/records between the screen. Referencing properties of a control present on a different screen to get values and data is not a good practice. To get the referenced value PowerApps will have to render the screen in the background, which could slow down the app.
Example: In the below application there is a gallery listing record of 5 employees. If you wish to display data of the selected employee on another screen. Then store data of the selected employee in a variable and use that variable on another screen. Code on for OnSelect of Next Arrow:
Set(varEmployeeRecord, ThisItem);
Navigate(DetailsScreen)
And set the item property of the Display form on DetailsScreen to varEmployeeRecord.
- Keep in-app media limited to 60 MB. If you need to have more space for your media then upload the media file(s) on the cloud and use the access link in PowerApps.
- If apps require to use of the same layout of controls several times or across different applications then use the Components feature of PowerApps.
Example: Header and footers in all the application screens and related application screens could/would be the same throughout the applications they can be designed using Components
Data
- Limit the use of non-delegable functions in your application (to zero if possible). [A yellow warning symbol appears on control if your query is not delegable]
- Loading data on the OnStart of application will slow down the application.
- While choosing a data source for your application make sure the data source fits your requirements concerning PowerApps usage (for example, the limit for API calls, functions, operations delegable, and data type mappings, etc). Below are a list of API call limits and Delegable functions for SQL server connectors.
- Avoid loading unnecessary data in your application. Use cache for static data or for data that is not going to change throughout a user session.
Power Automate Flows
- We can use Power Automate Flows to create PDFs and CSV files. While creating files make sure you are providing the full path. And overwrite is set to true in the Create action.
- If you are using Automate flow to return a collection of records to PowerApps then make sure you have a correct JSON schema and include null data types wherever there is a possibility of getting a null value.
- In Automate Flows, if an input variable has spaces at the ends/in between make sure to trim those if you wish to use that text variable to create a user/directory/file or any other kind of object.
Example: In the below image we have a flow to create a user in the office, and the input name given for the User has spaces in it. We need to trim those using the trim() function.
Others
- Rename the control on your screen with a relevant name. Makes easier to find and reference (if required) a control.
- Have an access control list or table, to control the access of Screens and Data provided to users.
- SQL triggers or stored procedures cannot be invoked from within the PowerApps.
- If you are writing data into an excel table using Automate flow then use delay action to hold the flow until all data is written in the table. (Time the duration according to the size of your data)
- Display record counts of items in the gallery and total items.
- Avoid overlaying controls (especially input controls) on top of each other.
- Avoid using temporary files to provide a user with CSV or Excel downloads function. (It can cause unintentional overwrites or take more than the required time to create a file)
- Use a development environment to Develop and test an application.
To know furthermore, points that can help you develop a better PowerApps application, you can go through the blogs listed below and also go through the PowerApps performance tips given in Microsoft documentation: