Forum Discussion
Suth_
Mar 17, 2022Copper Contributor
Creating an indicator for due dates in a sharepoint list
Hello I am trying to create an indicator in my sharepoint list to show me when 14 days has past, since an entry into the list, but only if another column is at a certain state. Example: I cre...
RobElliott
Mar 18, 2022Silver Contributor
Suth_ the Created column doesn't like having advanced mode JSON formatting applied to it. So first of all create a calculated column called Created 2 and set the formula to =[Created]. There is another Yes/No column for the Completed checkbox.
Then format that Created2 column and in advanced mode add the following JSON code. Note that JSON does 14 days in milliseconds.
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json",
"elmType": "div",
"txtContent": "@currentField",
"style": {
"background-color": "=if(@currentField < @now - 1209600000 && [$Completed] != 'Yes', 'red', 'green')",
"color": "white"
}
}
Rob
Los Gallardos
Intranet, SharePoint and Power Platform Manager (and classic 1967 Morris Traveller driver)