cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Super User
Super User

How to comment HTML in PowerApps?

Working with HTML in PowerApps can be quite challenging for me due to all the " " " 's and " & " 's. To make my HTML more portable and reusable, I'd like to comment the code. 

 

  • Unfortunately, HTML comments written as " <!-- comment --> " do not seem to work. 
  • Neither does PowerApps comments written as " // comment " nor multiline PowerApps comments written as: 
/* multi-
line
comment/
*

 

Does anyone have a nice method for commenting HTML that I may be missing? 

 

Thank you

 

1 ACCEPTED SOLUTION

Accepted Solutions
Power Apps Staff CarlosFigueira
Power Apps Staff

Re: How to comment HTML in PowerApps?

Hi Eric,

 

How are you trying to use the <!--...--> comments? I've used them in the past (see image below of a HTML Text control), and they've worked for me without problems.

 

ForumPost001.PNG

View solution in original post

4 REPLIES 4
Power Apps Staff CarlosFigueira
Power Apps Staff

Re: How to comment HTML in PowerApps?

Hi Eric,

 

How are you trying to use the <!--...--> comments? I've used them in the past (see image below of a HTML Text control), and they've worked for me without problems.

 

ForumPost001.PNG

View solution in original post

Super User
Super User

Re: How to comment HTML in PowerApps?

Wow, I feel silly! Why did I think that was not working? I must have been looking for it to turn "green" like a PowerApp comment. 

 

My apologies. 🙂

Power Apps Staff CarlosFigueira
Power Apps Staff

Re: How to comment HTML in PowerApps?

Glad it works for you :). You don't see them in a different color because they are part of the string itself.

 

Notice that you can also use "PowerApps comments" if you break down the string (HTML) into multiple parts (and combine them with the & operator or the Concatenate function:

ForumPost002.PNG

or

ForumPost003.PNG

Super User
Super User

Re: How to comment HTML in PowerApps?

Awesome. That is very helpful as well!

Helpful resources

Announcements
Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Join THE global Microsoft Power Platform event series

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Microsoft Business Applications Virtual Launch

Join us for the Microsoft Business Applications Virtual Launch Event on Thursday, April 2, 2020, at 8:00 AM PST.

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (10,117)