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 Apps / Change Icon Colour bas...
Power Apps
Answered

Change Icon Colour based on Value

(0) ShareShare
ReportReport
Posted on by 181

I need to the 'Tick' Icon on power apps Green, from its native Blue when the Value of the Status box is 'Complete' 

 

I currently have 4x options in my Status box:

 

Pending

Submit

Action Required

Complete

 

I have the Visibility of this icon set to true if values 'Submit' or 'Complete' are selected using the following:

 

If(ThisItem.Status.Value="Submit" Or "Complete",true,false)

 

However, I'm struggling to get the icon to change colour depending on which of the two values is selected, so need help with the following:

 

If Status Value = "Submit", colour should be RGBA(0, 18, 107, 1)

If Status Vale = "Complete" Colour should be RGBA(99, 139, 44, 1)

 

Many thanks

Categories:
I have the same question (0)
  • Community Power Platform Member Profile Picture
    on at

    Hi @Angry_Sys_Admin 

     

    refer to this link it will help you to resolve your issue.

    Solved: Change Icon color based on a choice value - Power Platform Community (microsoft.com)

     

    If this post helps, then please consider Accept it as the solution to help the others and consider giving it a "Thumbs Up."

    Solved: Change Icon Color based on Number Value (Simple!) - Power Platform Community (microsoft.com)

  • Angry_Sys_Admin Profile Picture
    181 on at

    @Raksh1Wadel I had a look at this thread before posting, 

     

    I added a label with ThisItem.Status.Value  to check I was getting the correct result and it retunred the correct and expected result.

     

    However I am unable to get the Switch to work, this is what I have:

     

    Switch(
     ThisItem.Status.Value,
     "Complete", RGBA(99, 139, 44, 1), 
     "Submit", RGBA(0, 18, 107, 1), 
    )

     

    Angry_Sys_Admin_0-1665064651868.png

     

  • Verified answer
    RandyHayes Profile Picture
    76,297 Super User 2024 Season 1 on at

    @Angry_Sys_Admin 

    You have an extra comma in your formula.

    Should be:

    Switch(
     ThisItem.Status.Value,
     "Complete", RGBA(99, 139, 44, 1), 
     "Submit", RGBA(0, 18, 107, 1)
    )

     

    Your Visible property is not correct either.  It should be:

    ThisItem.Status.Value = "Submit" Or ThisItem.Status.Value = "Complete"

    Beyond that, you don't need the redundant If/true/false part...the above already returns a true or false.

     

    I hope this is helpful for you.

  • Angry_Sys_Admin Profile Picture
    181 on at

    @RandyHayes This has worked 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

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 Apps

#1
WarrenBelz Profile Picture

WarrenBelz 711 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 319 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard