Forum Discussion
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 expires. Not everyone has to do the same assessments.
I need to add to add conditional formatting into a date column to do the following:
If the cell is blank for it to be shaded grey.
If the date has expired the for it to be shaded red (the light coloured red)
If the date has not expired for it to be coloured green (the light green).
Any help much appreciated.
1 Reply
- Rob_ElliottSilver 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)