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

Change colour if above specified value

Is is possible to have a text box change the text colour if the about a specified number? 

I need it to go red when about 160 but cant seem to figure it out. Any help would be much appreciated!

 

ps: please explain as simply as possible! Smiley Very Happy

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Change colour if above specified value

Hi @Courtney ,

Do you want to change the Text Input box color to red when the entered value is 160?

 

I have made a test on my side, please take a try with the following workaround:10.JPG

Set the Color property of the Text Input box to following:

If(Value(TextInput1.Text) = 160, RGBA( 255, 0, 0, 1 ),RGBA(0, 0, 0, 1))

 Or

If(Value(TextInput1.Text) = 'A specific number', RGBA( 255, 0, 0, 1 ),RGBA(0, 0, 0, 1))

Please check the following GIF screenshot for more details:Test.gif

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
3 REPLIES 3
Super User
Super User

Re: Change colour if above specified value

Hi  
In the Color property of the Textbox put the formula (Assuming the name of the control is TextInput1)

If(Value(TextInput1.Text)>160,Red,Black)


A shortcut to using Value() is to multiply the entered value *1. ie.

If(TextInput1.Text*1>160,Red,Black)
Community Support Team
Community Support Team

Re: Change colour if above specified value

Hi @Courtney ,

Do you want to change the Text Input box color to red when the entered value is 160?

 

I have made a test on my side, please take a try with the following workaround:10.JPG

Set the Color property of the Text Input box to following:

If(Value(TextInput1.Text) = 160, RGBA( 255, 0, 0, 1 ),RGBA(0, 0, 0, 1))

 Or

If(Value(TextInput1.Text) = 'A specific number', RGBA( 255, 0, 0, 1 ),RGBA(0, 0, 0, 1))

Please check the following GIF screenshot for more details:Test.gif

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Courtney
Level: Powered On

Re: Change colour if above specified value

perfect thank you!

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

SecondImage

PowerApps Monthly Community Call

Next Wednesday, September 18th at 8am PDT

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

Users Online
Currently online: 47 members 4,669 guests
Please welcome our newest community members: