Showing results for 
Search instead for 
Did you mean: 
Frequent Visitor

Yes/No Sharepoint Online Column in HTML Compose action

I'm trying to compose an HTML table whereby two Yes/No fields in Sharepoint will be row shaded(<tr> tag) if one or both is/are Yes (true).


My compose input look like this:

if(or(bool(item()?['PicturesReceived']),bool(item()?['Follow_x002d_UpReceivedReceived'])),replace(outputs('Style_th_tag'),'<tr>','<tr style="background-color:#ffc78f;">'),outputs('Style_th_tag'))

Kudo Kingpin
Kudo Kingpin



could you just use column formatting (JSON) for this in the modern sharepoint view?  I think that'd be a lot easier. If you're using classic sharpoint doing the same via JS link on a list view would also be simple.  Perhaps you have a good reason to do this in flow?


If you wish to go the html table route in flow I'd:

  1. create a stringvariable (varHTMLTable). set it's value to "";
  2.  Create a condition to check whether your bool == true. if so, set varHTMLTable (with your bg color - <tr style="background-color:#ffc78f;">)
  3.  Else set varHTMLTable (with normal background).

If any of these solutions work, please mark this as answered.

Community Support
Community Support


Hi @RonDinoso ,


Is this expression valid after running Flow? Are there any errors?

If so, please provide it to us to analyze it.


Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @v-bacao-msft ,

The Flow runs every morning, gets items that were appended or modified within a day's time, builds the HTML table to be emailed.  All of the compose actions use the replace() string function to modify the various tags in the table, but only the "Style tr tag" uses an if statement against two conditions.  The or() operator looks at the two Yes/No columns in my Sharepoint list.  I figured if the value is a Yes in either column, then the or() operatore will return a true.  If the or() function is true, then it modifies the <tr> tag by changing the background-color.


The flow works up to the if condition.  I'm thinking don't have have my or() test correct.  Is the Yes/No column in a Sharepoint List treated as a string value in Flow, or a boolean true/false?


HTML Flow Code.png

HTML Flow Code 2.png


Hi @RonDinoso ,


The value returned by Yes/No column is true/false, so you could try to remove the bool() function and directly reference the field value.



Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (1,953)