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

View solution in original post

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

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. 🙂

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

Power Automate Community User Group Member Badge

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

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors
Users Online
Currently online: 213 members 6,423 guests
Please welcome our newest community members: