cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Rule Creation

Hello everyone

 

I need to create a rule to change the font and the color of the warranty field in my inventory app, I have a datefield with the expression, Text( DateAdd( Now(), -90 ), "[$-en-US]mm/dd/yyyy" ), and if the warranty field(Datacardvalue61) is < or > to change its color, any ideas?

 

Thanks

Miguel

 

 

Capture1.PNG

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Frequent Visitor

Re: Rule Creation

Found the issue, here is the correct formula,  If('Warranty End Date'>=Today()-90,Black,Red)

View solution in original post

3 REPLIES 3
Highlighted
Super User
Super User

Re: Rule Creation

The Rules functionality has been deprecated meaning it is going away very soon.  You need to move this logic into your properties instead.  

In the Font property, you will use an If(condition, what to do if true, what to do if false).  In your case, you will want to update the Color property which is what controls the font color and you'll want to do that with an If based on a condition in your warranty field.  It will be very similar to this example where I am comparing a date against today to see if the date is past and then setting the color of the field if today is greater than the date in the field.  The first part (RYGStatus.Value = "Completed" || RYGStatus.Value = "Closed" || RYGStatus.Value = "On Hold") sets the color to black if the date no longer matters.  The second part (CurrentPlanDate >= Today()) does the date check to see if there is still time left to finish the task.  If it is true, it makes the font black.  If it is false, it makes the font red.  

D2.png

LRVinNC

------------------
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Highlighted
Frequent Visitor

Re: Rule Creation

Thank you 

 

Highlighted
Frequent Visitor

Re: Rule Creation

Found the issue, here is the correct formula,  If('Warranty End Date'>=Today()-90,Black,Red)

View solution in original post

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published 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 (6,967)