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

How to change font color in HTML table using two and conditions

(0) ShareShare
ReportReport
Posted on by 4

My SharePoint list got RoomStatus: Blocked/Released and BlockedUntil: Date.

Under select action, I can change fonts for BlockedUtil with a 3 days date check with the below expression.

 

 

If(empty(item()?['BlockedEndDate']), '', if( lessOrEquals(item()?['BlockedEndDate'] , addDays(formatDateTime(utcNow(), 'yyyy-MM-dd'), 3, 'yyyy-MM-dd')), concat('<font color= "Red">',item()?['BlockedEndDate'],'</font>') , concat('<font color= "Green">',item()?['BlockedEndDate'],'</font>')))

 

 

 

But when I want to use it like  -If RoomStatus equals Blocked and above condition, I am getting a syntax error. New bee here. Any help?

Categories:
I have the same question (0)
  • Verified answer
    v-dezhili-msft Profile Picture
    Microsoft Employee on at

    Hi @Brpanda23 ,

     

    Please try:

    If(empty(item()?['BlockedEndDate']), '', if( and(equals(item()?['RoomStatus/Value'],'Blocked'),lessOrEquals(item()?['BlockedEndDate'] , addDays(formatDateTime(utcNow(), 'yyyy-MM-dd'), 3, 'yyyy-MM-dd'))), concat('<font color= "Red">',item()?['BlockedEndDate'],'</font>') , concat('<font color= "Green">',item()?['BlockedEndDate'],'</font>')))

     

    Best Regards,

    Dezhi

     

  • Brpanda23 Profile Picture
    4 on at

    Thank you!!

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!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 304

#2
David_MA Profile Picture

David_MA 245 Super User 2026 Season 1

#3
Expiscornovus Profile Picture

Expiscornovus 243 Most Valuable Professional

Last 30 days Overall leaderboard