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
Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

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

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (7,647)