Forum Discussion
SharePoint View formatting incorrect when first landing on the list
- Feb 26, 2019Ey Paul,
All the times I have use the view formatting in modern SPO, I have not face the issue you are mentioning here so it could be something to the JSON you have generated or specific to your tenant
Hi Juan,
You might be right. I have taken a pnp template of the list and applied to a different tenant, and added some data.
Clicking around this new tenant, doesn't seem to be affecting the view formatting.
Thanks. Looks like I need to make a support call to Microsoft, for my original tenant.
I was wrong, it is happening on other tenants too, but the results are not all green. But they are wrong.
My Json is below.
{
"schema": "https://developer.microsoft.com/json-schemas/sp/view-formatting.schema.json",
"additionalRowClass": "=if([$Advice_x0020_Status] == 'Fed back','',if([$Decision_x0020_deadline] < @now, 'ms-fontColor-neutralSecondary ms-fontColor-redDark ms-fontSize-mPlus ms-fontWeight-bold sp-field-severity--blocked',if([$Decision_x0020_deadline] <= @now + 604800000,'sp-field-severity--severeWarning ms-fontColor-neutralSecondary ms-fontWeight-bold',if([$Decision_x0020_deadline] <= @now + 2419000000,'sp-field-severity--warning','sp-field-severity--good ms-fontColor-neutralSecondary'))))"
}
Its as if @now is not registering properly at load. But when you switch view, because it is a partial load it has the @now value. I have now logged a call with Microsoft. Will update with answers.
- sgramsJan 29, 2021Copper Contributor
Paul Matthews I'm experiencing this issue as well and wondering if there was ever a workaround other than telling my users to "reload the page until it works".
- Paul MatthewsJan 29, 2021Brass Contributor
sgrams wow this is an old post.
Are you in the UK? I found the problem lies with the locale. Never got a solution though.
Unfortunately that is the last time I actually did any work in regards to list formatting in SharePoint. I mainly work in Azure now.