Forum Discussion
Approval Status Column Formatting - gone!
- Apr 01, 2019
Tanya Denton . We faced the same issue the same day, it seems that Microsoft have removed that option. I managed to remove JSON format by going to hidden field in this way: https://sbseguros.sharepoint.com/sites/facturacion/_layouts/15/FldEdit.aspx?List=%7B84A2577F-043C-4821-B9DC-2B7F871A6EA6%7D&Field=_ModerationStatus
You can go to another field's settings of the same list and replace that field name for "_ModerationStatus" in the url.
Hello Tanya,
could you please share the code needed to have the column approval status display different colors for different values (it's an automatic column created in the library which i use for approval workflow) ?
Thank you : )
- Tanya DentonJul 09, 2019Iron Contributor
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json",
"elmType": "div",
"attributes": {
"class": "=if(@currentField == 'Approved', 'sp-field-severity--good', if(@currentField == 'Pending', 'sp-field-severity--low', if(@currentField == 'Draft', 'sp-field-severity--warning', if(@currentField == 'Rejected', 'sp-field-severity--severeWarning', 'sp-field-severity--blocked')))) + ' ms-fontColor-neutralSecondary'"
},
"children": [
{
"elmType": "span",
"style": {
"display": "inline-block",
"padding": "0 4px"
},
"attributes": {
"iconName": "=if(@currentField == 'Approved', 'CheckMark', if(@currentField == 'Pending', 'Forward', if(@currentField == 'Draft', 'Error', if(@currentField == 'Rejected', 'Warning', 'ErrorBadge'))))"
}
},
{
"elmType": "span",
"txtContent": "@currentField"
}
]
}