2023 Power Apps Coding Standards For Canvas Apps

2023 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 2023 that includes all of the latest features
  • These coding standards can be continuously improved as new Power Apps features hit “general availability” in 2024, 2025, 2026 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

46 Comments
Oldest
Newest
Inline Feedbacks
View all comments
Amy
Amy
11 months ago

Awesome sauce 😁

lRohit Wattamwar
lRohit Wattamwar
11 months 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
11 months ago

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

Gerard
Gerard
11 months ago

This is an epic share – much appreciated 👍

Daniel
Daniel
11 months ago

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

Ajit Sharma
Ajit Sharma
11 months ago

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

Sharon L
Sharon L
11 months 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
11 months ago

Thank you for putting this together!!

Andrés
Andrés
11 months ago

Matthew did it again.

Thank u for such awesome document.

Reiner Knudsen
Reiner Knudsen
11 months 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
11 months 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
11 months ago

Weldone for this selfless service to PowerAddicts

Kurt
Kurt
11 months 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
10 months 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
10 months 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 10 months ago by pgsm
Andrew A
Andrew A
10 months ago

Absolutely amazing!!

pgsm
pgsm
9 months 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.
9 months 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
9 months ago

Excellent resource, thanks Matthew! 👏

Am Miller
Am Miller
8 months ago

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

Lina Delgado
Lina Delgado
6 months 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!