Forum Discussion
SarahC690
Oct 07, 2024Copper Contributor
Conditional Formatting - Sharepoint List
It has been a while since using sharepoint lists and I am a bit out of practice! I have set up a list which shows a list of Assessments which each staff member needs to complete and the date it e...
Rob_Elliott
Oct 07, 2024Silver Contributor
SarahC690 you would format the date column in advanced mode, deleting whatever's there and paste in the following:
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json",
"elmType": "div",
"txtContent": "@currentField",
"style": {
"background-color": "=if(Number(@currentField) == 0, 'gray', if(@currentField >= @now, 'green', '#fb6767'))",
"color": "white",
"padding-left": "4px"
}
}
Rob
Los Gallardos
Microsoft Power Automate Community Super User.
Principal Consultant, SharePoint and Power Platform WSP Global (and classic 1967 Morris Traveller driver)