SOLVED

Approval Status Column Formatting - gone!

Steel Contributor

I may be having a senior moment, but the column formatting on a document library with Approval Status switched on has disappeared. It was there the other day but looking at it now it looks like this
format.jpg

I presume I used the view format, as when I tried to reapply the format using column format the option is not there on this column (it is on all the other columns in the library).  The view format is now empty - really confused - anyone out there experiencing the same problem or can point me in the right direction pretty please?

42 Replies
What a rockstar! Thanks!
Thanks all your feedback. We are going to bring back this feature very soon. Hoping it should be available ~3 to 4 weeks time however we don't have exact ETA

@Madhuko_MSFT Why was it gone in the first place? Unexpected side effect of a change, or Product Management / Design choice that has now been cancelled? Can we expect more of these surprises?

@Madhuko_MSFT  Since yesterday afternoon"Moderation Status" field shows blank on all lists /sites, but it you get item properties by OData or Rest, the field has the correct value.  I suppose Microsoft is aware of this issue and is working on it, isn't it?

@Madhuko_MSFT, hope this is a priority for you guys right now, my end users are kicking and screaming... ;)

@escipion Awesome, thank you! Looks better now even though the col is empty... Hoping MSFT releases a fix shortly.

Hi, I can confirm that _ModerationStatus has broken rendering on all First Release and Standard Release tenancies. This is a breaking change for all of our users who use a modern view for approvals. Complete work stoppage for some; 3 - 4 weeks is out of the question for a fix.
This would be fine if it was just JSON Column Formatting but is broken for default rendering now also.
As a workaround (for us barely acceptable, but better than stopping completely), filtering by status does work. Rightclick the approval status column> pin to filter. Then at least you're able to know what the status is. For us especially critical for QA Approvers who need to know what docs are pending approval.

@Charles Pritchard  Thanks for the update. Meanwhile, we've had  to instruct users to use "Classic View" to check item's approval status. 

@escipion - Check this issue still exist now.

@Madhuko_MSFT  It's working ,  column value  can be seen again, although JSON format option  is still missing,. Great! 

@escipion - Thanks confirmation. " JSON format option" - We are aware of this

Thanks for the tip!
When trying to filter by status i notised the optoin "Group by Approval Status" that may work as an alternative solution until the issue is sorted out...

@escipionFormat in the column status Works great with you suggestion. However, the option export to Excel is not available now. It was an error when we try to get Excel sheet. It is not possible  get conection with SharePoint list. Do you know something about that?

@dennis78 @Tanya Denton @Norman Young @Brian Meeuwenberg @nz_archer @escipion @AlanJG @Maggan Wåhlin @Charles Pritchard 

 

 

This is fixed now and rollout yesterday/today. Please get validate :)

@Madhuko_MSFT  It's working on our tenant. Issue seems solved. Thanks!

@Madhuko_MSFT 

Column formatting is now working for our tenant.   Thanks.

@Tanya Denton 

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 : )

@ikoalosaurus 

 

{
"$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"
}
]
}

@Tanya Denton 

 

I have fixed the issue by using this JSON:

 

{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
"elmType": "div",
"attributes": {
"class": "=if([$_ModerationStatus] == 0, 'sp-field-severity--good', if([$_ModerationStatus] == 2, 'sp-field-severity--warning', if([$_ModerationStatus] == 1, 'sp-field-severity--severeWarning', 'sp-field-severity--blocked'))) + ' ms-fontColor-neutralSecondary'"
},
"children": [
{
"elmType": "span",
"style": {
"display": "inline-block",
"padding": "0 4px"
},
"attributes": {
"iconName": "=if([$_ModerationStatus] == 0, 'CheckMark', if([$_ModerationStatus] == 2, 'Error', if([$_ModerationStatus] == 1, 'Warning', 'ErrorBadge')))"
}
},
{
"elmType": "span",
"txtContent": "=if([$_ModerationStatus] == 0, 'Approved', if([$_ModerationStatus] == 2, 'Pending', if([$_ModerationStatus] == 1, 'Warning', 'Rejected')))"
}
]
}