2024 Power Apps Coding Standards For Canvas Apps

2024 Power Apps Coding Standards For Canvas Apps

Welcome to the Power Apps Coding Standards For Canvas Apps.

In this guide you will find 50+ pages of coding rules, guidelines and best practices I use everyday to create Power Apps Canvas apps. I have spent the last 3 years building Power Apps every day. Now I want to share the knowledge I’ve gained in this set of easy-to-understand, actionable examples.

Power Apps already has an official set of canvas coding standards released back in 2018. So why did I make my own? A few reasons:

  • I wanted an updated set of standards and guidelines for 2024 that includes all of the latest features
  • These coding standards can be continuously improved as new Power Apps features hit “general availability” in 2025, 2026, 2027 and beyond
  • Readers can leave comments on my website describing their own best practices which I can incorporate into future versions



I hope you enjoy my Power Apps Coding Standards For Canvas Apps.




Table Of Contents

  1. 🔠 Naming Conventions
  2. 📦 Variable Types
  3. 📝 Commenting Code
  4. Canvas App Settings
  5. 🔎 Reviewing Canvas Apps
  1. 🎨 App Theming
  2. 📋 Form Design & UX Guidelines
  3. 🖼 Gallery Design & UX Guidelines
  4. 🐞 Error-Handling
  5. Optimizing Performance
  6. 👓 Improving Code Readability



Additional Sections

  • 🌳 Change Log – tracks all updates made to the coding standards



Questions?

If you have any questions about 2023 Power Apps Coding Standards For Canvas Apps please leave a message in the comments section below. You can post using your email address and are not required to create an account to join the discussion.

Subscribe
Notify of
guest

56 Comments
Oldest
Newest
Inline Feedbacks
View all comments
Amy
Amy
2 years ago

Awesome sauce 😁

lRohit Wattamwar
lRohit Wattamwar
2 years ago

Hi Matthew,

Thanks for your fantastic work on PowerApps best practices work. Do you also have the best practices for data verse schema creations, from where PowerApps pulls data, like answers of a couple of questions below.
1. Creating a common, less complex schema for PowerApps as well as Power BI for reporting, i.e. how to handle multi selects in reporting.
2. How to create a multi select lookup columns, which data type to use to store and retrieve this information in power app
3. How to create multi select person column, irrespective of he or she is having power apps licence, they should be visible and selectable in drop down
4. How to handle a star schema like data model in power app, say 8 to 9 tables
5. How to reuse by default offering from data verse like, forms, views etc in canvas apps
6. How to work with business logics in data verse in canvas apps, the way it’s used in model driven apps.
Etc.

Regards,
Rohit

Ankur
2 years ago

I mean…this is awesome Matthew! Like really awesome.

Gerard
Gerard
2 years ago

This is an epic share – much appreciated 👍

Daniel
Daniel
2 years ago

Really nice.
Awesome job. Thanks a lot for you work and sharing

Ajit Sharma
Ajit Sharma
2 years ago

Thanks Matthew for sharing, its awsum to have all details at one place.

Sharon L
Sharon L
2 years ago

As a citizen developer, I’m not sure if you realise the absolute gift your guides and references are to the community. They are my go to every time I open Power Apps!
You are a legend!

Md. Hidayat
2 years ago

Thank you for putting this together!!

Andrés
Andrés
2 years ago

Matthew did it again.

Thank u for such awesome document.

Reiner Knudsen
2 years ago

Thank you, my friend, for this invaluable gift. I already loved your posts, but this summary is a magnificent support for everyday app development. You are an absolute hero.
And I LOVE the frontpage picture.

Sarath Subramaniam
2 years ago

Thank you for sharing this, very useful. Can we also consider adding prefixes for variables inside the ‘With’ formula or the ones inside ForAll when using ‘As’?Something like var (variable), itr (iterator).

Ibrahim
Ibrahim
2 years ago

Weldone for this selfless service to PowerAddicts

Kurt
Kurt
2 years ago

Hi Matthew

Whenever I have to solve a very specific problem, I know there’s a Cat out there that provides an absolute goldmine of knowledge. Thank you for sharing.

pgsm
pgsm
2 years ago

Mathew, should you link an Edit Form to a Gallery through Gallery.Selected? Or should you use a variable to hold the selected item and link the form to the variable? Thanks in advance.

pgsm
pgsm
2 years ago

I’m using a variable, too (varItemSelected). However I’m facing some difficulties. For instance:

What do you set your Gallery Default property to?

In my scenario, the form and gallery are in different screens. When I create a new record, the form flashes and the varItemSelected fills the form. This is not correct, since a new record can’t be the same that was previously selected in the gallery (the item property of the form is set to the variable varItemSelected). I can set the varItemSelected to Blank() when creating a new record, but then the form will show up empty after I create the record and I need the user to remain there since the user needs to use some custom controls to fill the whole record. So, to solve this, I’m setting the LastSubmit infomation to a variable in the OnSucess property of the form and then setting this variable to the gallery’s Default property. Then when I create a new record, I reset the gallery and the form gets filled with the newly created record. Could you tell me what you think about it? It seems too “hacky”, like i’m improvising. I don’t like it.

Last edited 2 years ago by pgsm
Andrew A
Andrew A
2 years ago

Absolutely amazing!!

pgsm
pgsm
1 year ago

Greetings, Matthew,

Hey, do you know if it’s possible to prevent users from create a powerapp based on the list that has been shared with them?

It’s crazy. You put this huge amount of effort into creating user experiences, applying business rules, and there’s nothing stopping users from just creating a simple power app, adding a list and a form and bang, they can do as they please, if you don’t have stuff like item level security put in place, and even that won’t stop them from bypassing the rules or completely messing up their items in the list.

Thanks in advance

Tomas L.
Tomas L.
1 year ago

Wow Matthew,

I was reading your blog(site) for some time now, found there many useful things there. Started back when the design was the old one not this pink(ish) 🙂 and now subscribed and download your coding standards. And man. All this stuff in one place? A masterpiece. I got the knowledge in many areas also written down but not in one place. This is gold.

Thank you for your time and effort 🙂

Tomas

Keith Atherton
1 year ago

Excellent resource, thanks Matthew! 👏

Am Miller
Am Miller
1 year ago

Thank you so much for having all this helpful info in one place!

Lina Delgado
Lina Delgado
1 year ago

Excellent Information, I was looking if you have information on Using Word Templates WITHOUT Premium Connectors on power app, my client has the power app free version. Thanks, in advance!

Jose Tamez
1 year ago
Reply to  Lina Delgado

Awesome site and I know you’ve put a lot of effort and work into this. No doubt, your site and a few other Power App sites, or should I say training sites, have been a god-send to me and has been helping me out big time. Like the list of Power Apps functions, I haven’t seen that anywhere except for the Microsoft documentation but Microsoft has always been lame in that department, especially when SharePoint broke out with MOSS2007, or even with 2003. I always visit here first if I need something. Sometimes you don’t have what I need but you’re definitely a great resource and good place to start. You added much to the list of functions like you said it has been very helpful. Now you’ve provided us with this great write-up on best practices and I found delegation ironic, and inline with the true nature of connectionless web applications. With Power Apps it’s now explained a bit different but all the same but, probably a bit more important and more appreciated….lol

Thanks for all the info and help and keep up the great work.