Forum Discussion
Chris Cundy
Aug 11, 2022Brass Contributor
Column formatting - Last Review Date + 365 days
Hello, I wish to format a date column named Last_x0020_review_x0020_date with conditional formatting to display either the column or ideally the entire row in "Red" with white text. For examp...
- Aug 11, 2022
Chris Cundy Yes, you have to add one more condition in expression like:
{ "$schema": "https://developer.microsoft.com/json-schemas/sp/view-formatting.schema.json", "additionalRowClass": "=if(if(Number([$LastReviewDate]) == 0, 'ms-bgColor-yellowLight', [$LastReviewDate] + 31536000000 <= @now , 'ms-bgColor-red ms-fontColor-white', ''))" }
Reference: SharePoint JSON formatting: Check if date & time column is blank/empty
Output:
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
Aug 11, 2022MVP
Chris Cundy Yes, you have to add one more condition in expression like:
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/view-formatting.schema.json",
"additionalRowClass": "=if(if(Number([$LastReviewDate]) == 0, 'ms-bgColor-yellowLight', [$LastReviewDate] + 31536000000 <= @now , 'ms-bgColor-red ms-fontColor-white', ''))"
}
Reference: SharePoint JSON formatting: Check if date & time column is blank/empty
Output:
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.
Chris Cundy
Aug 11, 2022Brass Contributor
- ganeshsanapAug 11, 2022MVP
Chris Cundy You're welcome, glad it worked for you!
Please consider giving Likes if my posts helped you in any way.