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 Apps / Fill Circle On Column ...
Power Apps
Answered

Fill Circle On Column Selection

(0) ShareShare
ReportReport
Posted on by 92

This question has been answered several times but I can't seem to get my code to work. I have a circle that I would like based off of the manager approval column. Approved=Green, Pending=Yellow, Not Approved=Red. Here is the code I am placing in the "Fill" section of the circle:

 

Switch(
 ThisItem.'Manager Approval'.Value,
 "Not Approved", Red,
 "Approved", Green,
 "Pending Manager Approval", Yellow
)

 

 

I'm receiving numerous errors but I'm not sure why:

LaMakiry_1-1695316797377.png

 

 

Categories:
I have the same question (0)
  • CarlosFigueira Profile Picture
    Microsoft Employee on at

    If you qualify the colors with the <<Color.>> enumeration prefix, will it work?

    Switch(
     ThisItem.'Manager Approval'.Value,
     "Not Approved", Color.Red,
     "Approved", Color.Green,
     "Pending Manager Approval", Color.Yellow
    )
  • LaMakiry Profile Picture
    92 on at

    No, I tried that as well 😞

  • CarlosFigueira Profile Picture
    Microsoft Employee on at

    Looking at your first error (see below), is that expression inside a gallery? The 'ThisItem' keyword is only available inside galleries, to refer to the item bound to the current row.

    ForumPost001.png

    Hope this helps!

  • LaMakiry Profile Picture
    92 on at

    No this is not a gallery, just a screen (if I'm saying that correctly). I also tried an if statement but that does not seem to work either.

  • Verified answer
    CarlosFigueira Profile Picture
    Microsoft Employee on at

    I believe the expressions you showed is for a data card inside a form - inside the form it can also access a 'ThisItem' value. If your circle is outside the form, you can reference the value that is set to the Item property of the form. So if the Item property is set to 'Gallery123.Selected', for example, you can update your switch statement as

    Switch(
     Gallery123.Selected.'Manager Approval'.Value,
     "Not Approved", Color.Red,
     "Approved", Color.Green,
     "Pending Manager Approval", Color.Yellow)

    Another option would be to reference the control on which the user selects the approval value (which in your case seems to be called 'DataCardValue83'), so your expression would look like

    Switch(
     DataCardValue83.Selected.'Manager Approval'.Value, // or DataCardValue83.Selected.Value, not sure what the properties of your control are
     "Not Approved", Color.Red,
     "Approved", Color.Green,
     "Pending Manager Approval", Color.Yellow)

    Hope this helps!

  • LaMakiry Profile Picture
    92 on at

    Thank you! The DataCardValue option worked perfectly.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 352 Most Valuable Professional

#2
11manish Profile Picture

11manish 192

#3
Valantis Profile Picture

Valantis 128

Last 30 days Overall leaderboard