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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Error using 'If' funct...
Power Automate
Unanswered

Error using 'If' function in canvas app

(0) ShareShare
ReportReport
Posted on by 69

Hello,

I am having a error using If function to change the colour of rectangle based on the value of status. 

 

Wah22_0-1703868809095.png

 

The value of Status is showing with number in dataverse. How can I convert to it? 

 

Thanks

I have the same question (0)
  • Verified answer
    RobElliott Profile Picture
    10,323 Super User 2025 Season 2 on at

    @Wah22 what you should do is to add a text label (I've named it lblStatus) to the first item in your gallery and set the text to ThisItem.'Status (cr900_status)'. You can then turn off the visibility.

     

    Then for the rectangle you want to change the color of use the following formula:

     
    If(
        lblStatus.Text = "Approved",
        Color.Green,
        lblStatus.Text = "Rejected",
        Color.Red,
        Color.Purple
    )
     
    dataverseChoiceColor.png

     

    Rob
    Los Gallardos
    Principal Consultant, SharePoint, Forms and Power Platform, WSP Global (and classic 1967 Morris Traveller driver)
  • Wah22 Profile Picture
    69 on at

    Hi @RobElliott , 

     

    It works now. Many thanks for support. 

     

    Best regards,

    Wah

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard