Feb 26 2019 04:13 AM
Feb 26 2019 04:13 AM
I have a SharePoint list where I have applied a formatting view. It displays the row either Red, Orange, Yellow, Green depending on a date field. I have the same formatting view on 2 different views, and all columns required in the formatting view are displayed in the views.
However, when I first hit the default view everything is green. If I switch the view from one to another, and then switch back again, the view shows the correct colours for the correct rows.
Is there a known bug regarding timing issues of loading the view format? Could there be an issue with my view template?
Feb 26 2019 05:51 AMSolution
Feb 26 2019 06:19 AM
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.
Feb 26 2019 07:08 AM
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.
"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.
Jan 29 2021 06:48 AM
@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".
Jan 29 2021 07:24 AM
@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.