cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
bruce
Level: Powered On

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
Power Apps Staff CarlosFigueira
Power Apps Staff

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
Power Apps Staff CarlosFigueira
Power Apps Staff

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

bruce
Level: Powered On

Re: Changing Color of text based on a checkbox

Thanks Carlos that worked perfectly.

Helpful resources

Announcements
New Ranks and Rank Icons in April

'New Ranks and Rank Icons in April

Read the announcement for more information!

Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

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