Skip to main content

Notifications

Power Apps - Building Power Apps
Answered

Conditional formatting based on Toggle value

(0) ShareShare
ReportReport
Posted on by 21

I am needing to change the fill color on a datacardvalue based on a Yes/No toggle.

 

In this example, if "System Requires Maintenance" is Yes, then I need the "Comments" field to be Red.

 

EvaAGarcia_0-1634662766006.png

I have tried:

EvaAGarcia_1-1634662919602.png

But, this makes the "Comments" field Red regardless of the toggle value.

 

Once I get through this hurtle, I also need it to do the following: when text is entered into the "Comments", I need it to go back to normal (White).

 

  • EvaAGarcia Profile Picture
    EvaAGarcia 21 on at
    Re: Conditional formatting based on Toggle value

    Thank you very much; that worked. Do you have a solution or an idea what to do for changing back when text is entered?

  • Verified answer
    eka24 Profile Picture
    eka24 20,921 on at
    Re: Conditional formatting based on Toggle value

    Try this:

    If(Toggle1.Value,Red,White)

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

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,343

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,703

Leaderboard