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 / Conditionally highligh...
Power Automate
Unanswered

Conditionally highlight 1 cell in a html table

(0) ShareShare
ReportReport
Posted on by 116

Hi, i have an email that is generated through a flow and the feedback i have is that the Yes/No isn't obvious. Any ideas how i can make 1 option stand out over the other? Change background colour maybe?

 

ToastYes
CerealNo
EggsNo
BaconYes
PorridgeYes
SausageYes
Categories:
I have the same question (0)
  • annajhaveri Profile Picture
    8,531 Most Valuable Professional on at

    @The_blue There isn't direct way to do this type of formatting in flow, you can use below expression to format specific column, but you need to also the value in the expression. Use this expression after Create HTML action by adding compose action.

    replace(body('Create_HTML_table'),'<td>Blue','<td class="tdcolor">Blue')
    

     Then add another compose action and provide following that compose action. Here are you are defining the styling, like the background color

    <style>
    .tdcolor{
    background-color: red;
    }
    </style>

     

    Now use outputs of those compose actions in the send email action, first use Output of Styling compose action and then output of HTML compose action.

     

  • annajhaveri Profile Picture
    8,531 Most Valuable Professional on at

    @The_blue  another alternative is to not use Create HTML table action and define the HTML table as shown in this post https://alextofan.com/2019/02/14/flow-how-to-change-the-style-of-your-html-table-in-flow/

     

  • Mark-Shenouda Profile Picture
    Microsoft Employee on at

    Hi @The_blue 
    Hope you are well, 
    the only way you can apply this is by structuring the HTML based on the value of the field
    Please check this similar Post.
    https://powerusers.microsoft.com/t5/Building-Flows/highlight-some-entries-in-a-Create-HTML-table-or-remove-extra/td-p/606585 


  • Paulie78 Profile Picture
    8,422 Moderator on at

    Your requirement is quite simple as you only want to make a distinction between the Yes or No values. You can do it like this:

    tableHighlightYes.png

    The expression I used in the final compose was:

    replace( body('Create_HTML_table'), '<td>Yes</td>', '<td style="background-color:#ADD8E6">Yes</td>')

    Which produces output like this:

    Paulie78_0-1613474033588.png

     

  • Krish1729 Profile Picture
    53 on at

    Hello,  @The_blue @Paulie78 

     

    I would like to do it for both Yes and No. Please provide a solution for it.

     

    Thanks,

    Krishna

  • Krish1729 Profile Picture
    53 on at

    Hello,  @The_blue @Paulie78 

     

    I would like to do it for both Yes and No. Please provide a solution for it.

     

    Thanks,

    Krishna

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 523 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 406 Moderator

#3
abm abm Profile Picture

abm abm 245 Most Valuable Professional

Last 30 days Overall leaderboard