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

Announcements

News and Announcements icon
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,978 Moderator 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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 959

#2
Valantis Profile Picture

Valantis 872

#3
Haque Profile Picture

Haque 589

Last 30 days Overall leaderboard