Forum Discussion
Microsoft List formula is not working
Hi Imi_Jay ,
instead of using a calculated column you can also use JSON list formatting to achieve this effect.
That will recalculate automatically.
I translated your formula into this JSON (I hope i got the logic right)
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
"elmType": "div",
"txtContent": "=if([$DueDate]=='Missing info','Missing info',if(((Number([$DueDate])<=Number(@now)) && (toString([$ResultOutcome]) == '') && (toString([$DateResultMarked]) == '')) || ((Number([$DueDate])<=Number(@now)) && [$Require2ndAttempt] && (toString([$ResultOutcome]) == '') && (toString([$DateResubmissionPassed]) == '')),'OVERDUE',''))"
}
Just select your column and then select "Column Settings" and then "Format this column"
Switch to "Advanced Mode " at the bottom of the new dialog
Now paste the JSON formatting into the editor and save
Best Regards,
Sven
SvenSieverding
Thanks! Logic is correct. For some reason it's showing Overdue for all the scenarios. Could that be the way column name like [Date - resubmission passed ] should be written in the JSON code differently? That's the only issue I can think of. Appreciate if you can look into this.
Thanks,
Imalka Jayalath