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 / $if conditional does n...
Power Automate
Unanswered

$if conditional does not work on text color - Adaptive cards

(0) ShareShare
ReportReport
Posted on by 6

Hi,

 

Anyone know how to solve the problem of if conditional statement in adaptive card with power automate? 

 

Having this issue, thanks.

 

blacklist1_0-1674247372407.png

 

Categories:
I have the same question (0)
  • Expiscornovus Profile Picture
    33,768 Most Valuable Professional on at

    Hi @blacklist1,

     

    I believe there is logical comparison function for this called greaterOrEquals.

     

    Try something like the below in your color property:

     

    ${if(greaterOrEquals(change,0), 'Good', 'Attention')}

     

     

  • blacklist1 Profile Picture
    6 on at

    Hi,

     

    Did this and its working on VS Code and the Adaptive Designer.

     

    But once I use it in adaptive card in power automate, it don't show any color. 

    blacklist1_0-1674476362496.pngblacklist1_1-1674476385926.png

     

  • Expiscornovus Profile Picture
    33,768 Most Valuable Professional on at

    Hi @blacklist1 

     

    I see you are using version 1.2 for the card. Have you tried it with version 1.3?

     

     

    {
    "type": "AdaptiveCard",
    "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
    "version": "1.3"
    }

     

     

    Are you testing in teams or in the adaptive designer? I have seen issue before with the designer website, while it did work in Microsoft Teams itself 😁

    https://powerusers.microsoft.com/t5/General/Conditional-formatting-for-adaptive-cards/m-p/1514296/highlight/true#M3379

     

     

  • blacklist1 Profile Picture
    6 on at

    Hi, I tried to use 1.3 but still having the same error, its working on the designer and vs code, but once i use it in powerautomate (send an adaptive card to a chat via teams, it doesnt work)

     

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
David_MA Profile Picture

David_MA 262 Super User 2026 Season 1

#2
Haque Profile Picture

Haque 227

#3
Expiscornovus Profile Picture

Expiscornovus 225 Most Valuable Professional

Last 30 days Overall leaderboard