Jul 22 2024 02:30 AM
Hi all,
I have a SharePoint list in which I would like to create a formatting view on row-level. I want to achieve that the rows will be visualized red when the Urgency is set to 'Oplossen binnen <6 maanden' (English (Solve in 6 months), the status is unequal to 'Gereed' (English: Done) and the item has been there for over 6 month checking to the date it is created.
I used following syntax but unfortunately nothing happens. Can someone help me with this?
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/row-formatting.schema.json",
"additionalRowClass": "=if([$Urgentie] == 'Oplossen binnen <6 maanden' && [$Status] != 'Gereed' && (Number(utcNow()) - Number([$Created])) > 15778800000, 'ms-bgColor-redDark', '')"
}
Jul 22 2024 04:30 AM - edited Jul 22 2024 04:31 AM
Solution@DekkerNick1 can you replace the utcNow by the '@now' special string value?
Try something like below
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/row-formatting.schema.json",
"additionalRowClass": "=if([$Urgentie] == 'Oplossen binnen <6 maanden' && [$Status] != 'Gereed' && (Number(@now) - Number([$Created])) > 15778800000, 'ms-bgColor-redDark', '')"
}
Jul 22 2024 05:47 AM
Jul 22 2024 04:30 AM - edited Jul 22 2024 04:31 AM
Solution@DekkerNick1 can you replace the utcNow by the '@now' special string value?
Try something like below
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/row-formatting.schema.json",
"additionalRowClass": "=if([$Urgentie] == 'Oplossen binnen <6 maanden' && [$Status] != 'Gereed' && (Number(@now) - Number([$Created])) > 15778800000, 'ms-bgColor-redDark', '')"
}