Forum Discussion
Jeff_Lacarte
Nov 05, 2021Brass Contributor
Approval Status Column Suddenly Numeric - Due to Column Formatting?
I'm working in my tenant and noticed an issue with all of my lists that have content approval turned on. The approval status column now lists a number instead of the words "Approved" | "Rejected" | "...
- 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
Jeff_Lacarte
Nov 15, 2021Brass Contributor
Giving you access to the enumeration value is a good change sure, but changing the returned value of an existing variable is not. People have built custom views around this, and to change it is not ok.
ganeshsanap
Nov 16, 2021MVP
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
- Jeff_LacarteNov 16, 2021Brass Contributor
ganeshsanap thanks for the info and finding this. Further to TonieB 's comments, the wording of the change makes it seem like it only affects those who elected to use a specific field in custom JSON formatting for a very specific purpose. However the fact is this breaks Out-of-the-box formatting found in SharePoint; the field that was changed is the field that was used by OOB formatting and thus the field that everyone used to further customize if they used their own JSON formatting. Because it's what was used internally!
Here is an example: as soon as you turn on Conditional formatting you can see the approval status immediately change to the number '2'. This is OOB behavior, no custom formatting in place. They've broken their own code with this change.
- Jeff_LacarteNov 16, 2021Brass Contributor
Since the reported changes now break the out of the box conditional formatting for the Approval Status column I've opened a new issue on GitHub referencing the breaking change.
At least if that gets fixed those who want to use conditional formatting on the Approval Status column will be able to without having to dive into the JSON and go on a wild goose chase looking for the required fields to use.
- TonieBNov 16, 2021Copper ContributorSo . . . are you saying formatting was broken intentionally, without letting anyone know ahead of time, in order to customize that column to add a feature one person asked for? And Microsoft is going to update everyone with info several weeks after the formatting was broken for anyone who had formatting on that column?? So that anyone using SharePoint with formatting on that column will be wondering for weeks on end what the issue is, unless they stumble upon this post thread???