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 / Change a shape colour ...
Power Apps
Answered

Change a shape colour based on a toggle field

(0) ShareShare
ReportReport
Posted on by 580

Hi All,

 

I want to change a colour of a circle based on a value of a toggle. 

So if the toggle is True - Circle is Green. If the toggle is False - Circle is Red.

button-toggle.png

At the moment, you can see the output I have above. 

 

Thanks!

 

Categories:
  • Verified answer
    RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @AdamH 

    Change the Fill property of the shape to:

    If(yourToggleName.Value, Green, Red)

     

    I hope this is helpful for you.

  • AdamH Profile Picture
    580 on at

    @RandyHayes 

     

    My toggle is showing as a datacardvalue / DataCardKey7

    2021-05-14 21_11_19-NC Codes - Saved (Unpublished) - Power Apps.png

     

     

     

    Its the Manager Code field I'm trying to use

    2021-05-14 21_13_31-Window.png

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @AdamH 

    Then the formula is the same except with your control name in it.

       If(DataCardValue7.Value, Green, Red)

  • AdamH Profile Picture
    580 on at

    @RandyHayes 

     

    Yeah I thought that and tried that before I messaged you back, it's giving me 'IF' has invalid arguments. 

     

    2021-05-14 21_23_50-NC Codes - Saved (Unpublished) - Power Apps.png

     

  • AdamH Profile Picture
    580 on at

    @RandyHayes 

     

    Ignore me, It was my mistake, I was selecting datacardkey rather than value. 

     

    Thanks @RandyHayes 

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 354 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 320

#3
Mohsin Ali Profile Picture

Mohsin Ali 246

Last 30 days Overall leaderboard