cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
New Member

Changing Color of text based on a checkbox

Hi all,

I am trying to create a check box that can be selected in order to highlight an item that needs to be re-ordered. So far I have created the checkbox and in the "advanced" section set "OnCheck" to true

The formula in the desied text section has been set to...
If(Checkbox1=true,Color.Red,Black)
However it is marking the = sign as incorrect

What am I doing wrong?

Thanks in advance

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Power Apps
Power Apps

Re: Changing Color of text based on a checkbox

You need to compare the Value property of the checkbox:

If(Checkbox1.Value=true,Color.Red,Color.Black)

Or simply:

If(Checkbox1.Value, Color.Red, Color.Black)

View solution in original post

2 REPLIES 2
Highlighted
Power Apps
Power Apps

Re: Changing Color of text based on a checkbox

You need to compare the Value property of the checkbox:

If(Checkbox1.Value=true,Color.Red,Color.Black)

Or simply:

If(Checkbox1.Value, Color.Red, Color.Black)

View solution in original post

Highlighted
New Member

Re: Changing Color of text based on a checkbox

Thanks Carlos that worked perfectly.

Helpful resources

Announcements
secondImage

New Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (8,774)