Options for Documenting Your Power Apps: Comments, Code, and Controls

Within Power Apps there are various ways to document your app. In this post I’m looking at comments in Power Apps

Options to documenting your code in Power Apps

As part of my day job at Vantage 365 I do a lot of health checks of apps and flows. This often means that I’m looking at apps that have been developed by other people. It would be very helpful if apps and flows were documented. In this post I will focus on apps in Power Apps.

There are a few different ways of documenting your apps.

  • Name your screens, controls and variables properly
  • Write a document
  • Comments in code
  • Add Comments to your app

Name your screens, controls and variables properly

Of course we all name our screens, controls and variables properly, so I’m not going to spend any time on that now. The time of c++ in code is something from the past.

Write a Document

You could of course open Word and write a document describing your solution. For Architectural choices made this may be ok, but separating the solution and the documentation isn’t the easiest way to pick up an app. As mentioned I’m used to this, and it takes a bit of training to understand “the why” behind apps that don’t work.

Comments in code

Now in code you can add comments. So for example in the code below there is a comment that explains what a line of code does.

Single line comments in Power Apps
Single line comments in Power Apps

In a similar way you can comment out multiple lines of code or add comments that take take a number of lines. with /* and */

Multiline comments in Power Apps
Multiline comments in Power Apps

The above is especially useful to explain to others what your thoughts were when you added that complicated line of code.

Also when you remove a line of code, you could add your initials and a reason for changing the code.

Add Comments to your app controls

Like in Power Automate you can also add comments in Power Apps.

Now if you have recently created a new app you will have noticed these purple boxes popping up on your screens.

Templates and comments on a new screen
Templates and comments on a new screen

And you might also have noticed them when you add controls like a button:

Comments on a button control
Templates and comments on a new screen

Yes, they do get a bit in the way sometimes. But the general idea is nice. You can now add comments in your app related to a control or screen. You can even mention other people in your comments, making it easier for them to find the place where you want them to have a look at a problem that you may be facing.

Power Apps will even help you make sure that you share the app with the users that you mention, if they haven’t got access to the app yet.

Give people mentioned in a comment access to the app.
Give people mentioned in a comment access to the app.

Now the user mentioned will receive an email as shown below, making it so easy to find the comment inside the app

Pieter Veenstra mentioned you in a comment
Pieter Veenstra mentioned you in a comment

With these options of documenting available, please add comments to your app. You never know one day, I might be reviewing your app.


Discover more from SharePains

Subscribe to get the latest posts sent to your email.

Related Posts

4 thoughts on “Options for Documenting Your Power Apps: Comments, Code, and Controls

    1. Hi Marie, Thank you for your comment. Yes, indeed that is a great solution if you are happy to document code with a document. However, I very much prefer to find comments inline with my solution. It is a bit like who reads the user manual of a car, if you want to know how it works most people just turn it on.

      With Power Apps I quite often look at the code and then try to figure out what the developer tried to do. If the documentation is right there where I need it then that helps a lot.

      1. Comments are great for people that work in PowerApps. We needed documentation for people not opening the apps. Are the images in this article correct? Most are showing screenshots of Shifts in Teams.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.