SharePoint列表列格式架构无法解析



我有以下列格式:

{
"$schema": "https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json",
"elmType": "div",
"txtContent": "@currentField",
"attributes": {
"class": "=if(indexOf(toLowerCase(@currentField),'07') != -1, 'ms-fontColor-redDark','')"
}
}

第一行给出如下错误:$ref '/properties/attributes/class' in 'https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json' can not be resolved.(768).

将模式链接替换为https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json会抛出相同的错误。

这个列表上周工作正常,没有改变格式,我得到这个错误,我不知道如何解决这个问题。

编辑:我可以在浏览器中打开JSON链接,从我可以告诉它看起来不错。

您是否在SP 2019中尝试,SP 2019不支持excel样式的表达式。这是我找到的文章。你能参考一下这篇文章吗?

https://learn.microsoft.com/en-us/answers/questions/423002/sharepoint-json-column-formatting-not-working.html

最新更新