{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
"elmType": "div",
"style": {
"box-sizing": "border-box",
"padding": "4px 8px 5px 8px",
"overflow": "hidden",
"text-overflow": "ellipsis",
"display": "flex",
"border-radius": "16px",
"height": "24px",
"align-items": "center",
"white-space": "nowrap",
"margin": "4px 4px 4px 4px"
},
"attributes": {
"class": "=if([$ContainerSize] != [$Sys_Container_Size], 'sp-field-severity--severeWarning','sp-field-severity--low')+ ' ms-fontColor-neutralSecondary'"
},
"children": [
{
"elmType": "span",
"style": {
"display": "inline-block",
"padding": "0 4px"
},
"attributes": {
"iconName": "=if([$ContainerSize] != [$Sys_Container_Size], 'ErrorBadge', 'Accept')"
}
},
{
"elmType": "span",
"txtContent": "@currentField"
}
]
}
SharePoint List formatting Error
Hi, MS expert I found a issue when setting format in SharePoint List via Json Error: ref '/properties/attributes/class' in 'https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json' can not be resolved.(768) The URL is correct, but why there is an error?
Microsoft 365 and Office SharePoint For business Windows
6 answers
Sort by: Most helpful
-
PacoCN 15 Reputation points
2024-02-05T08:25:19.4133333+00:00 -
PacoCN 15 Reputation points
2024-02-05T08:28:07.4133333+00:00 The error is: ref '/properties/attributes/class' in 'https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json' can not be resolved.(768)
-
Xyza Xue_MSFT 30,176 Reputation points Microsoft External Staff
2024-02-06T01:24:53.6333333+00:00 Hi @PacoCN ,
Thank you very much for your time and providing details for me to test.
It seems this is not a common issue per my test. I can't reproduce your situation. Here are my test results:
Based on my internal and external searches, I found someone with the same problem as you, please refer to it:https://sharepoint.stackexchange.com/questions/302332/column-formatting-throws-768-schema-error-ootb
Note: Microsoft is providing this information as a convenience to you. The sites are not controlled by Microsoft. Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. Please make sure that you completely understand the risk before retrieving any suggestions from the above link.
The error you are seeing is because of an invalid reference in the schema file. There's nothing wrong with your format, list, or environment. The Monaco Editor being used in the formatting tab is attempting to validate the schema (unsurprisingly, you get the same error in VS Code).The Formatting engine does not validate against the schema so this validation error, while irritating and confusing, won't prevent your formats from working. You can safely ignore the message.
Try ignoring this error message and see if it affects the result of your format. Hope the information can help you. And if there have any unclear or misunderstanding, please feel free to post back and we’ll continue to help you all the time!
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
-
PacoCN 15 Reputation points
2024-02-06T03:02:01.02+00:00 Hi, Haoyan I ignored this error message, but it affects the result of my format, I do not know how to fix it. In my opinion it is a bug of sharepoint.
-
Xyza Xue_MSFT 30,176 Reputation points Microsoft External Staff
2024-02-06T08:04:47.1133333+00:00 Hi @PacoCN ,
Unfortunately, After my internal and external searches, I wasn't able to find a solution to this problem. Maybe you could try a different browser. If that doesn't solve the problem, we suggest you can create a new service request in M365 admin center as an admin, and more professional will help you, they have higher access than I do and may be able to help you.
(Microsoft 365 admin center ->> Support ->> Help & support)
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.