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 / Conditional Formatting...
Power Apps
Answered

Conditional Formatting - Fill based on "Yes/No" switch

(0) ShareShare
ReportReport
Posted on by 79

Hi all,

In the snip below, if the "Is Action (1) Complete?" switch button is togged to "Yes', I would like the Action (1) comment box to fill green.

 

I am entering a formula into the "Fill" property for "Action 1" (included snip of an attempt), but nothing seems to be working. 

 

"DataCardValue4" is the name of the comment box I want to fill Green

DataCardValue5" is the name of the Yes/No switch the fill should be based on. (This field was originally On/Off, but I have changed that in the card properties - unsure if that makes a difference)

 

I'd be grateful for help as to what formula I should be using. Thanks in advance for your help.

FarmingBA_4-1686535715189.png

FarmingBA_5-1686535829083.png

 

 

Categories:
  • Verified answer
    Ami K Profile Picture
    15,689 Super User 2024 Season 1 on at

    Hi @FarmingBA ,

     

    Assuming your data source is SharePoint and the DataCardValue5 is a Yes/No field type. You can apply the below to the Fill property of DataCardValue4.

     

     

    If(DataCardValue5.Value,Color.Green,Color.White)

     

     

    ------------------------------------------------------------------------------------------------------------------------------

     

    If I have answered your question, please mark your post as Solved. Remember, you can accept more than one post as a solution.

    If you like my response, please give it a Thumbs Up.

     

  • Verified answer
    developerAJ Profile Picture
    4,763 on at

    @FarmingBA 

     

    Please refer the Amik solution

     

    FYI: The reason yours did not work is DataCardValue5.Selected.Value this is something you need to use for dropdown. For toggle(Yes/no) Column is DataCardValue5.Value is sufficient

    and the Output of toggle is true or false

    Switch( DataCardValue5.Value,true,Color.DarkGreen,false,Color.Orange)

     

    Please click Accept as solution and Thumbs Up. if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

     

  • FarmingBA Profile Picture
    79 on at

    Wonderful, it works. Thanks very much both of 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

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 342 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 258

#3
Mohsin Ali Profile Picture

Mohsin Ali 231

Last 30 days Overall leaderboard