web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id : nYmyOndY05ofvKi4kLuXfP
Power Automate - General Discussion
Answered

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

Like (0) ShareShare
ReportReport
Posted on 1 Mar 2023 04:28:22 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?

I have the same question (0)
  • Verified answer
    v-dezhili-msft Profile Picture
    Microsoft Employee on 01 Mar 2023 at 04:54:30
    Re: How to change font color in HTML table using two and conditions

    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 01 Mar 2023 at 10:04:06
    Re: How to change font color in HTML table using two and conditions

    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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 788 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 452 Moderator

#3
developerAJ Profile Picture

developerAJ 302

Last 30 days Overall leaderboard
Loading complete