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
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.
@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),
)
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)
WarrenBelz
146,601
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,942
Most Valuable Professional