Live training: next batches coming soon. Join the waitlist:Waitlists open:Developer Training →Developer →Copilot Studio Training →Copilot Studio →

Power Apps Comments: Comment Out Code in Formulas and Add Studio Comments

You open a button formula six months later and can’t remember why half of it is there. Or you want to switch off a Patch call for a test without deleting it.

In this tutorial, we’ll add a Power Apps comment to formulas with // and /* */, comment out code safely, and then use Studio comments to leave notes, tag teammates and resolve threads.

Quick answer: Type // to turn the rest of a line into a comment, or wrap any text in /* and */ for a block that spans lines. Power Apps ignores both, in any property. To comment out code, put // in front of each line or wrap it in /* */. Ctrl+/ doesn’t work.

Set(gblLastTitle, txtReqTitle.Text); // keep it
/* Patch(...) is switched off for now */

What You Need Before You Start

Both kinds of comments live in Power Apps Studio, the editor for canvas apps. If you’re new to it, our Power Apps tutorials hub starts from zero. Here’s our setup:

  • A Microsoft 365 account that can create canvas apps in Power Apps
  • Edit access to the app. Teammates need the app shared with them before they can add Studio comments
  • Our sample list, Service Requests on the SPGuides site, which the commented-out Patch refers to

A formula is the Power Fx code you type into a property, such as a button’s OnSelect. A property is one setting of a control, such as its Text or its color.

Build the Demo App Step by Step

1. Open the maker portal. Go to make.powerapps.com, stay on Home and select Start with design:

Power Apps maker portal Home page with Start with design selected for the comments demo

2. Start a blank canvas app. On the Create an app page, select Create from blank:

Create an app page in Power Apps with the Create from blank canvas app option

3. Pick the layout. Choose Tablet. Studio opens with a blank screen. We renamed ours scrComments in the Tree view on the left:

Start with a blank canvas dialog with the Tablet layout picked for the Power Apps comments app

4. Add the controls. Open Insert and add a Text input (txtReqTitle), a Button (btnSaveRequest) and two Text labels (lblCmtToday and lblCmtLast):

Power Apps Insert menu listing Text label, Text input and Button controls for the demo screen

Formulas go in the formula bar at the top. Select a control, pick the property in the dropdown left of fx, then type. To test, select Play at the top right, or hold Alt and click a button. Press Ctrl+S to save the app.

Step 1: Add Line Comments With // in a Formula

Select btnSaveRequest and pick OnSelect, the property that runs when someone clicks the button. Our post on the Power Apps button OnSelect property explains it in depth. Then paste this formula:

// Save a new help desk request
/* Status starts as New.
   The help desk sets Priority later. */
Set(gblLastTitle, txtReqTitle.Text); // keep it
Notify("Saved: " & txtReqTitle.Text,
    NotificationType.Success)
// Patch('Service Requests',
//     Defaults('Service Requests'),
//     {Title: txtReqTitle.Text})

A line comment starts with // and runs to the end of that line. You can put it on its own line, like the first one, or after the code, like // keep it after Set. Studio colors comments green, and the formula has no errors:

btnSaveRequest OnSelect in the expanded Power Apps formula bar with line comments, a block comment and Patch commented out

Set stores the typed title in an app-wide variable, gblLastTitle. Our guide to global vs context variables in Power Apps covers when to use one. Notify shows a green banner, explained in our Power Apps Notify function post.

Step 2: Write Block Comments With /* */

A block comment starts with /* and ends with */. Everything between them is ignored, even across several lines, which makes it the better pick for longer notes. Ours explains two business rules in two lines.

Two rules from Microsoft’s Power Fx grammar are worth knowing. Comments don’t nest, so a */ inside a block ends it early. And comment characters inside quotes are plain text, so “// not a comment” stays a string.

Step 3: Comment Out Code in Power Apps

To switch code off without deleting it, comment it out. We put // in front of each of the three Patch lines, so the button no longer writes to the list. Our Power Apps Patch function guide covers the call itself.

There’s no keyboard shortcut for this. Ctrl+/ did nothing in our formula bar, and it isn’t in Microsoft’s list of canvas app shortcuts. Type // on each line, or wrap the whole block in /* and */.

If an admin has turned on Copilot, typing // or /* can show a gray formula suggestion. Press Tab only if you want it. Otherwise keep typing or select elsewhere, and your comment stays as written.

Step 4: Test the Commented Formula in Preview

Select Play, type Printer jam on floor 3 and click Save request. The banner read “Saved: Printer jam on floor 3”, and lblCmtLast, set to “Last saved title: ” & gblLastTitle, showed the same title:

Power Apps preview with the Saved Printer jam on floor 3 banner after the commented formula ran

The comments didn’t change anything, and the commented-out Patch didn’t run. The Service Requests list still had 620 items.

Comments work in any property, not only behavior ones like OnSelect. We set lblCmtToday’s Text to this, and the label showed “Today: October 19, 2026”. For more date formats, see how to get today’s date without time in Power Apps:

// Date line under the form
"Today: " & Text(Today(), "mmmm d, yyyy") /* US format */

Step 5: Add a Studio Comment for Your Team

Studio comments are different. They’re notes for other makers, attached to the app, a screen or a control, and they show only in Studio, not in the running app. Select the Comments icon on the right rail. A new app shows “There are no comments in this app.” and a New button:

Power Apps Studio Comments pane opened from the right rail showing no comments and the New button

To comment on one control, right-click it on the canvas and select New comment. For a screen, right-click it in the Tree view instead:

Right-click menu on the Save request button in Power Apps Studio with New comment highlighted

Type your note in the box. The tip under it says Press Ctrl+Enter to post, or select the purple send button:

Power Apps comment typed in the comment box with the Ctrl+Enter tip and the purple send button

The thread shows your name and the time, October 19, 2026 at 9:59 AM in our test. A comment icon appears above the button on the canvas and next to scrComments in the Tree view:

Posted Power Apps comment thread with its timestamp and the comment icon above the button on the canvas

Step 6: Use @mention in Comments to Tag Someone

Type @ and the start of a name in a comment or reply. Typing @Mill listed Miller with his email address. Names come from your organization’s directory, so a name nobody has shows “No suggestions found for now.”:

Typing @Mill in a Power Apps comment reply shows Miller in the mention suggestion list

The person you tag gets an email naming the app and who tagged them, with the comment text and a direct link. If they can’t open the app yet, Power Apps asks you to share it. Our guide to share a canvas app with a Microsoft 365 group shows another way.

Step 7: Edit, Delete or Resolve a Comment Thread

Select … on a thread in the Comments pane. The menu shows Edit comment, Delete thread and Resolve thread:

Power Apps comment thread menu with Edit comment, Delete thread and Resolve thread options

Resolve a thread when the question is answered. It stays in the pane marked Resolved, and you can reopen or delete it later.

Power Apps Comment Cheat Sheet

TaskHowWhat we saw
Line comment// note to the end of the lineGreen text, no errors
Block comment/* ... */, can span linesTwo-line note ignored
Comment out code// on each line, or wrap in /* */Patch didn’t run, list stayed at 620
Keyboard shortcutNone. Ctrl+/ does nothingType the characters
Studio commentComments icon > New, or right-click > New commentThread with time and a canvas icon
PostCtrl+Enter or the send buttonPosted at 9:59 AM
Tag a maker@ + nameSuggestion list from the directory

What Are the Limitations of Power Apps Comments?

Formula comments have no special limits: they work in every property. Microsoft lists three limitations for Studio comments:

  • Only a limited number of people can edit an app at once. A person you tag gets the email right away, but must wait for you to close the app to see and resolve the comment.
  • Comments aren’t supported when you work on an app using Git.
  • @mention isn’t supported in SharePoint custom forms, the forms you build when you customize a SharePoint list form with Power Apps.

Common Mistakes to Avoid

  • Pressing Ctrl+/ and expecting a comment. Nothing happens. Type // yourself.
  • Nesting block comments. The first */ ends the block, so the rest of the outer comment is read as code and can break the formula.
  • Commenting out half a function. Comment out the whole call, as we did with all three Patch lines, or the formula breaks.
  • Accepting a Copilot suggestion by accident. Tab inserts it. Read the gray text first.
  • Using Studio comments as user help. They show only in Studio. Put user guidance in a label.

If your team builds apps like this every week, our Power Apps training course covers formulas, variables and SharePoint on real projects.

Next Steps

Add a short // note to the longest formula in one of your apps today, then leave a Studio comment for the next maker. When you’re ready to turn the Patch back on, our guide to submit a form to a SharePoint list in Power Apps shows the full save flow.

We’d read one of these next if you’re tidying up your Power Apps buttons:

Frequently Asked Questions

How do you comment out code in Power Apps?

Put // at the start of each line you want to switch off, or wrap the whole block in /* and */. Power Apps ignores commented text, so the code doesn’t run. In our test, a commented-out Patch didn’t create an item.

Are // comments supported in Power Apps?

Yes. Power Fx supports // line comments and /* */ block comments in any property, including OnSelect and a label’s Text. Comments aren’t processed inside quoted text.

Is there a shortcut to comment code in Power Apps?

No. Ctrl+/ did nothing in our formula bar, and it isn’t in Microsoft’s canvas app shortcut list. Type // or /* */ yourself.

How do I use @mention in Power Apps comments?

Type @ and the person’s name in a Studio comment, then pick them from the list. They get an email with the comment and a link. If they can’t open the app, you’re asked to share it. @mention doesn’t work in SharePoint custom forms.

Where does Microsoft document Studio comments?

Microsoft covers adding, tagging, resolving and the limitations in Add comments when you are building a canvas app on Microsoft Learn.