Forum Discussion
Jordaromera
Nov 11, 2021Copper Contributor
JSON format broken?
Hi,
Some days ago i have a incident with two differents lists, this problem probably due a Microsoft change in the SP Online. The first problem: in the attached screenshot a week ago i don't have these values in the columns, i have "Pending", "Approved", "Rejected", etc.
My second problem. i have a text column with a specific JSON code to start a workflow in PowerAutomate but the JSON code appears with in the final view i have a blank column.... See the second screenshot.
My JSON code attached.
Any with a similar problem? You can help me? Thanks in advance.
This is happening because of recent change in JSON schema to officially support Approval Status column in JSON formatting.
Due to this update, the @currentField and [$_ModerationStatus] will resolve to internal code (enum value) and @currentField.displayValue and [$_ModerationStatus.displayValue] will resolve to the localized string (I guess according to language).
The Microsoft official docs will be updated with more info in the coming weeks. You can check the details for now at: SharePoint Online Column Formatting for Approval Status: uses language specific text?
Similar thread: Approval Status Column Suddenly Numeric - Due to Column Formatting?
Related Read: How to find the Internal name of columns in SharePoint Online?
Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.
For SharePoint/Power Platform blogs, visit: Ganesh Sanap Blogs
- WorkflowIQCopper ContributorHi,
I am having exactly the same issue. I have checked multiple tenants where a similar JSON is used in a number of libraries and the same issue is show for all. Can we please get some feedback from Microsoft??
My post:
https://techcommunity.microsoft.com/t5/sharepoint/json-column-formatting-broken/m-p/2952937This is happening because of recent change in JSON schema to officially support Approval Status column in JSON formatting.
Due to this update, the @currentField and [$_ModerationStatus] will resolve to internal code (enum value) and @currentField.displayValue and [$_ModerationStatus.displayValue] will resolve to the localized string (I guess according to language).
The Microsoft official docs will be updated with more info in the coming weeks. You can check the details for now at: SharePoint Online Column Formatting for Approval Status: uses language specific text?
Similar thread: Approval Status Column Suddenly Numeric - Due to Column Formatting?
Related Read: How to find the Internal name of columns in SharePoint Online?
Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.
For SharePoint/Power Platform blogs, visit: Ganesh Sanap Blogs
- WorkflowIQCopper Contributor
ganeshsanap Jordaromera Thanks, I am not as skilled in JSON as i would like to be, so can you help with my code? The code i was using was as below. What would it change to, to meet the requirements of the new Moderationstatus changes?
"visibility": { "operator": "?", "operands": [ { "operator": "==", "operands": [ "[$_ModerationStatus]", "Pending" ] }, "visible", "hidden" ] }