web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Select is not passing ...
Power Automate
Suggested Answer

Select is not passing HTML

(1) ShareShare
ReportReport
Posted on by 77
I want to put some conditional formatting inside a table in my Power Automate. Right now, I am just testing passing formatting inside the Map based on some other posts I read.
However, instead of passing the HTML it is converting them to the markups codes.
When I look at the output code of that select function it looks fine:
"All Pass": "<div style='background-color: green'>Yes</div>",
 
But then I put it into an HTML table:
And instead it is putting this in table:
<td>&lt;div style=&#39;background-color: green&#39;&gt;Yes&lt;/div&gt;</td>
 
Is there a way to get the HTML to stick? Do I need to escape it somehow?
Categories:
I have the same question (0)
  • Suggested answer
    Michael E. Gernaey Profile Picture
    53,452 Super User 2025 Season 2 on at
    Hi
     
    You should really add the Html formatting to another Compose, so it will work properly.
     
    Here are 2 great resources... which reminds me to fix my darn blogs :-)
     
     
    If you apply the Styling this way, it will work.
  • Pjames43 Profile Picture
    77 on at
    I already have the bulk of the HTML formatting in another compose function. My ultimate goal is to make the formatting of soem cells conditional. For example, certain fields on the form are YES/NO questions. I want to change the background of that cell in the table based on contents of that cell. I was thinking I could put the if() statement inside the field on the "Map" something like this...
    The if() is working just fine, but the text has the same issue on the back end. I don't see how I can put the if() in the Compose function and have conditional formatting for individual cells. I had originally, tried it without the Select function and just directly creating the HTML Table and that had the exact same issue. 
  • Suggested answer
    Robby_WW Profile Picture
    115 on at
    add a compose and use this as formula.
     
    replace(
    replace(
    replace(
    replace(
    replace(body('Create_HTML_table'),
    '&lt;','<'),'&gt;','>'),'&amp;','&'),'&#39;','"'),'&quot;','"')
     
  • Suggested answer
    Mark277 Profile Picture
    9 on at
    Hi! It's actually quite easy to solve your problem. 
     
    In your Action "Create HTML Table" show the Advanced parameters and choose Custom Columns, there you'll have to set the Headers and corresponding values like in your Select Action. BUT! Encapsulate each value in an "encodeUriComponent()" function.
     
    After this you'll add a "Compose" Action with the function decodeUriComponent(body('Create_HTML_Table')) and all the values should have what you need.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 525 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard