Forum Discussion
SPO List Conditional Formatting
UBTech3812 Try using view formatting JSON something like:
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/view-formatting.schema.json",
"additionalRowClass": "=if([$AssignedDate] > @now && [$AssignedDate] <= addDays(@now,30), 'sp-field-severity--warning', '')"
}
Output:
You can change the number of days and class in JSON as per your requirements.
Documentation: view-list-formatting
Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.
ganeshsanap Same result. No rows highlight, despite numerous having assigned dates this month. I am not sure what's going on exactly. No errors... it just doesn't work if we try to use a relative date.
The only thing that seems to do ok is using design mode to create a rule for between a specific fixed date and @now.... but we need that date to be relative between now and 30 days before.
- ganeshsanapDec 12, 2022MVP
UBTech3812 Can you add the screenshot of your list view for sample data? Also add screenshot where you are adding the above JSON I provided.
Please consider giving a Like if my post helped you in any way.