Skip to main content

Notifications

Power Automate - Using Flows
Answered

Formatting table columns from Create HTML Table action

(0) ShareShare
ReportReport
Posted on by 24

Hello,

 

I created a table from the Create HTML Table action and wanted to conditionally format the cells (background color, text color, and font weight) by whether or not the 2nd column is true/false. Does anyone know how I would replace those row values?

 

maeux_1-1717109713766.png

 

 

  • Verified answer
    David_MA Profile Picture
    David_MA 8,929 on at
    Re: Formatting table columns from Create HTML Table action

    This is not possible with the Create HTML table action. If you want to do this, it will be a lot trickier. You'll need to:

    1. Initialize a string variable named rows (or whatever you prefer).
    2. Use an Apply to each to generate each row for the table.
    3. You'll need to add a condition to check the current item for the background color you want to use (I assume the True/False value).
    4. Then on each side of the condition, use an Append to string variable to create the HTML row with the styling you want. For example:  <tr style="background-color: green;"><td>May 28, 2024</td><td>True</td></tr>
    5. If you are using the output to send in an e-mail, you will need to put your e-mail action into HTML mode and enter the <table> and </table> tags and put the output of your variable in between: <table><variable></table>

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,445

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,722

Leaderboard

Featured topics

Restore a deleted flow