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 / How to change color of...
Power Automate
Answered

How to change color of text in table based on value

(0) ShareShare
ReportReport
Posted on by

Hello all,

 

I am building a quality control flow that will send an email report to individuals with a table of 10 questions and pass value (Yes, No, Needs work, N/A) based on data from a SharePoint List. I'm using Send an Email (v2) with an HTML body to build the table. Everything looks great, but I would really love to color code the pass value, e.g., Yes = Green, No = Red, Needs work = Yellow, etc. 

 

Does anyone have a solution or suggestion on how to do this?

 

Thanks!

Categories:
I have the same question (0)
  • Hardesh15 Profile Picture
    7,087 Super User 2024 Season 1 on at

    @animartis  You need to replace complete TD with your color code if it equals to yes. Use one compose and pass 

    <td style="color:Green;font-weight:bold;">Yes</td> then use equals() for color code.

    Please 'Thumbs Up' the posts that helped you and 'Accept as Solution' if my post answered your question.

    @Hardesh /Gopenly.in

  • animartis Profile Picture
    on at

    Thanks for the response, Hardesh. I understand the HTML piece but am having a hard time figuring out how to call the right variable (compose) based on the answer in the SharePoint List for each question. Any advice on that front?

  • Verified answer
    hhaliman Profile Picture
    48 on at

    You can use conditional switch action to do this https://www.enjoysharepoint.com/power-automate-switch-case/

    You just need to change the "switch on" field with your sharepoint column for "value", and change the "IT", "Administrator" with "Red", "Gree", etc

    hhaliman_0-1655524057907.png

     



  • animartis Profile Picture
    on at

    Thanks @hhaliman. So by that rationale, considering I have 10 different SharePoint List 'answers' to my 10 questions with 4 possible answers (Yes, No, Needs Work, N/A), am I correct in assuming that I will have to create 10 different case statements (1 for each answer)? I was hoping there was a way to use one case statement that said, "If any answer is Yes, pass this HTML code for the color GREEN." Almost like a lookup based on the answer.

  • Hardesh15 Profile Picture
    7,087 Super User 2024 Season 1 on at

    @animartis  You can rename the compose action. Go to compose action setting then rename. When you will select dynamic content it will reflect under your compose name.

    Please 'Thumbs Up' the posts that helped you and 'Accept as Solution' if my post answered your question.

    @Hardesh /Gopenly.in

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…

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
trice602 Profile Picture

trice602 398 Super User 2025 Season 2

#2
David_MA Profile Picture

David_MA 323 Super User 2025 Season 2

#3
Expiscornovus Profile Picture

Expiscornovus 183 Most Valuable Professional

Last 30 days Overall leaderboard