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
PowerApps Staff CarlosFigueira
PowerApps 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

4 REPLIES 4
PowerApps Staff CarlosFigueira
PowerApps 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

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. Smiley Happy

PowerApps Staff CarlosFigueira
PowerApps Staff

Re: How to comment HTML in PowerApps?

Glad it works for you Smiley Happy. 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
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

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

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

Top Kudoed Authors
Users Online
Currently online: 197 members 5,658 guests
Please welcome our newest community members: