Forum Discussion
Approval Status Column Suddenly Numeric - Due to Column Formatting?
- Nov 16, 2021
Jeff_Lacarte nfsg20 DavidLang Amiryunus SteveB aricornish YeBuu mcancela Duncan2450 Gavin Tully TonieB
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?
Related Read: How to find the Internal name of columns in SharePoint Online?
Please consider giving a Like if my post helped you in any way. For SharePoint/Power Platform blogs, visit: Ganesh Sanap Blogs
TonieB Thank you for confirming that you have the same problem. I suspected it might have been a MS change behind the scenes.
I encourage others to try testing a new list with content approval turned on and try adding column formatting on the Approval Status column. I suspect you will have the same results as TonieB and I. It would be helpful too if others post their results here.
TonieB, if your JSON formatting isn't terribly complex, I would try copying it into an editor like VS Code and do a find and replace on: [$_ModerationStatus] to @currentField.displayValue. That should at least get you back up and running as a workaround for now.
Thanks Jeff_Lacarte for workaround!