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

Conditional color change

I have tried but can not get this formula right.

Can someone tell me how to change a color of font based on data criteria.

I want to change the color of an edit box font if the date is older than 3 years. I have attached the form I use.

Thank you.

1 ACCEPTED SOLUTION

Accepted Solutions
Dual Super User
Dual Super User

Re: Conditional color change

Hi @KeithG 

 

You can update the expression on "Color" property of the Date Picker to:
If(DatePicker1.SelectedDate < DateAdd(Today(),-3,Years),Red,RGBA(0, 0, 0, 1))
 
Here, DatePicker1 is the name of Date Picker control.
 
Hope this Helps!
 
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

View solution in original post

4 REPLIES 4
Dual Super User
Dual Super User

Re: Conditional color change

Hi @KeithG 

 

You can update the expression on "Color" property of the Date Picker to:
If(DatePicker1.SelectedDate < DateAdd(Today(),-3,Years),Red,RGBA(0, 0, 0, 1))
 
Here, DatePicker1 is the name of Date Picker control.
 
Hope this Helps!
 
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

View solution in original post

KeithG
Level: Powered On

Re: Conditional color change

Sorry I meant Date Criteria

Dual Super User
Dual Super User

Re: Conditional color change

Hey @KeithG 

 

Can you share more details about this? Maybe through an example of the usecase? I am not getting what you mean by Date Criteria.
 
Hope this Helps!
 
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
KeithG
Level: Powered On

Re: Conditional color change

Perfect! 

Thank You. I spent hour and you helped in seconds.

Helpful resources

Announcements
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

New Badges

Check it out!

thirdimage

Power Apps Community User Group Member Badge

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

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors
Users online (6,138)