Could Microsoft Power Platform help boost innovation in your organisation? At Advania we regularly see how it provides an outlet for individual creativity to add value to our clients’ businesses.
In this blog, the second in a series introducing Power Platform apps, Solutions Architect Steve Worrell discusses how to create a canvas app in Power Apps, taking you from your initial app outline to the tools and best practices you’ll need to ensure success. Â
Canvas app best practicesÂ
App building is an inherently individual and creative process, but we’d recommend following some fundamentals to keep on the right path. Let’s take a look at some of the key things to consider when creating a canvas app.Â
Plan in advanceÂ
Before you even begin to create a canvas app, you should be clear on the business process you’re intending to implement and optimise. You should consider this by breaking down the process into smaller tasks. These tasks can then be achieved via fields in differing sections of either a single or multiple screens as a user passes through said process. It’s also essential to consider what the user journey should look like as they navigate the process within the app.Â
Once the process is clear we recommend designing the layout of each screen, whether by sketching on a piece of paper or using specialist wireframing software such as Figma. This will help visualise any potential issues and optimise your layout before creation starts, and will act as a reference guide throughout your build.Â
Know your data model before you create your appÂ
During pre-build it’s important to be aware of where you want to store data or retrieve it from when submitting and/or displaying it within the app.  Â
If you’re submitting new data, unless otherwise directed the best data storage options are SharePoint or Dataverse. With each of these, some form of data model will be required to be set up. Â
When using SharePoint you can utilise its dedicated connector to submit or retrieve data to a SharePoint list. With this method you have the option of either building the list first and then creating the app utilising the list fields, or creating the app first and then building the SharePoint list.Â
Use Dataverse if you need a central repository of organisational data. This is exactly what it is designed for, allowing users to submit and retrieve data from several different business applications into one database. Dataverse also provides ability to build a more complex data model with varying relationships between tables (e.g. One-to-One, One-to-Many and Many-to-Many). Â
In instances where you’re working with pre-existing organisational data, Power Platform provides data gateways (for on-premise systems), a wealth of connectors and the ability to create custom connectors to submit and retrieve data from existing databases and business systems. Â
Additionally, you can have the best of both worlds where you may need to work with existing data that can’t be modified in its incumbent application and add new process data alongside it. The existing data can be retrieved, displayed and submitted to Dataverse via the canvas app alongside the new data.Â
Follow app naming conventionsÂ
Using naming conventions is a simple but very helpful way of staying on top of navigating and maintaining your separate app features. You’ll be thankful you used them as your app begins to grow with screens, controls, variables, collections and data sources.Â
There is no one single standard for app naming conventions when creating a canvas app, but best practice states that consistency is key. Therefore, if you begin using camel case for your controls, you should continue with this throughout the app. Â
Microsoft’s own guidance is that screen names should describe their purpose, use plain language with no abbreviations, include spaces and end with the word ‘screen’. All these steps provide context and, importantly, make sense when read aloud by screen readers. Â
With control names, Microsoft suggest abbreviating them to three characters, where ‘button’ becomes ‘btn’, with the purpose of said button being appended to the abbreviation, e.g. ‘btnSubmitData’. Following this structure will aid search functionality and building formulas using these controls. Â
As with screens and controls, it’s recommended that variables and collections are named descriptively of their purpose and, as with controls, are abbreviated to three letters prior to the description, e.g. ‘varRecord’ and ‘colCityPopulations’.Â
Create a canvas app using powerful toolsÂ
Some of the amazing features of canvas apps can go unnoticed if you don’t know about them or where to find them. The following are useful tools I think every canvas app builder should be familiar with.Â
Employ templates as a starting point for creationÂ
The Power Apps maker portal provides more than 20 pre-built canvas app templates, ranging from Inventory Management to Employee Engagement Surveys. You can use them as a starting base for the app you plan to build or as a template to learn how to utilise canvas app functionality – or you could simply take the parts of the app you like and use them in your own apps. Â
They’re definitely worth checking out if you want to see the varied ways apps can be implemented.Â
Use formulas to add power and functionality Â
Though canvas apps are classed as no-code, their power comes from the built-in formulas available to add to your app to make it interactive. Â
The amount of functions, signals, enumerations and named operators which fall under the umbrella of formulas are vast, but Microsoft offers documentation covering them in detail.Â
Formulas allow a multitude of functionality. For example, functions are provided to filter, look up and delegate data retrieved from your data source, which is incredibly helpful and allows for performance optimisation. Â
Furthermore, formulas can allow you to interact with all control properties, allowing you to change icon colours on a click, display a validation message to the user, or even submit data to the data source. In addition to this, canvas apps provide various operators such as arithmetic, comparisons and concatenation to name just a few.Â
Quite possibly the best thing about formulas is that they use Power Fx, which is exactly the same formula language, functions and operations used in Excel. If you’re familiar with Excel you’ll find the transition to using formulas in Power Platform seamless. The only difference is that instead of your formulas working on cells, they work on objects and control properties.Â
Include components for additional controlÂ
Canvas apps allow for the building of components within an app. Components are essentially custom controls which provide numerous advantages. One such benefit is that components are re-usable, not only within the app in which they are created but across multiple apps when they’re added to a component library.Â
Components are extremely useful when you want to utilise the same control, such as navigation, across multiple screens without copy and pasting each time. Additionally, when a component is changed within a canvas app, that amendment is reflected across all instances of the component within that app.
Where components and the components library really come into their own is when using similar custom functionality across multiple apps, as they provide you with the ability to import the component to other canvas apps and utilise them straight away.Â
Manage your app via searchÂ
With any canvas app you’ll find that your controls, objects and components grow as you add more functionality. Â
This is where utilising the search tool is worth its weight in gold. The search pane within the maker portal allows you to find, go to and replace your app elements quickly and efficiently, as it includes screens, variables, collections, media, components, data sources and even flows in its search capability. Â
In addition, there are really useful search options available, from matching case or whole word to regular expressions. Â
Combining search and naming conventions should make managing your app features a painless and more straightforward task.   Â
Canvas app best practices: test and test againÂ
Whether you create a canvas app as part of a business project or just a side hobby, it’s imperative to test throughout the build and heed any warnings or errors from the in-built App Checker functionality.Â
As you add new controls and formulas to your app, functional testing is encouraged to ensure your new functionality does what you expect it to do. The Preview button in the editing screen opens the app in its current state giving you immediate testing capability. Â
In App Checker, a red dot will appear if an an error is detected – such as with a formula – but will not appear where there are potential accessibility issues. Therefore, before publishing your app, you should ensure the app meets all necessary accessibility standards.Â
Collaborate and integrateÂ
It’s always useful to have another pair of eyes review the app once you’ve begun implementation. You may even have colleagues you wish to co-author the app with.Â
Once your app is ready for launch, you can share it with your entire organisation and guest users provided they all have the relevant licensing.Â
Completing the app isn’t necessarily the end of the journey either, as you may wish to consider the other parts of Microsoft 365 it could be integrated with. For example, your app may be useful to utilise and access via Teams. If so, it’s possible to add it via the apps settings. Moreover, canvas apps can be embedded in SharePoint and model-driven apps. Â
With this widespread ability to share and integrate, you have every opportunity to ensure that all required users are able to reach and utilise your app.Â
Stuck? Found a bug? Want more canvas app best practices? Use the communityÂ
Depending on who you ask, you might get a completely different list of canvas app best practices than the ones I’ve listed here, which is exactly why you should utilise the plethora of brilliant content and tutorials available from Microsoft and the growing Power Platform community.Â
There’s an incredibly talented, knowledgeable and super-enthusiastic community that has been born out of the genesis of the Power Platform. That’s just as well, as Microsoft continues to improve and add to this suite of products. App builders will be continually looking to keep on top of the latest releases to improve and evolve their apps and share that experience with others.Â
The Power Platform community has many skilled contributors but we don’t think you can go wrong when looking for tutorials on how to create a canvas app (aside from contacting us at Advania) than viewing the YouTube channels of Microsoft MVPs Shane Young, April Dunnam and Reza Dorrani.  Â
Your next steps to create a canvas appÂ
In this article I’ve highlighted some of the high-level best practices and considerations when building canvas apps, but there’s so much that could still be delved in to. If you found this article of interest and would like to know more about canvas app specifics, please let us know.Â