cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ericonline
Community Champion
Community Champion

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
CarlosFigueira
Power Apps
Power Apps

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
CarlosFigueira
Power Apps
Power Apps

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

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

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

Awesome. That is very helpful as well!

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Don't miss the call this month on June 16th - 8a PDT

Top Solution Authors
Top Kudoed Authors
Users online (59,594)