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?
Solved! Go to Solution.
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.
Thank you LRVinNC, but im getting an invalid argument for the following Color "settings" " If(TextInput1=Today(),Black,Red) " , invalid argument, any ideas?
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
Join us on June 28 for our monthly User Group leader call!
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.