0

I'm trying to check the value of the column _ModerationStatus in a document library with that has content approval.

I have the following JSON:

 {
      "$schema": "https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json",
      "elmType": "div",
      "debugMode": true,
      "txtContent": "[$_ModerationStatus]"
}

I get the following message in the console:

could not evaluate _ModerationStatus

The column is included in the view and the column displays Approved and so on. So the column seems to be working correctly.

What am I doing wrong? :)

1

As a workaround, we can create a text field "ApprovalStatus", then create a workflow to set the value from the "Approval Status" field to this new field.

Then using the JSON below:

{
  "$schema": "https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json",
  "elmType": "div",
  "debugMode": true,
  "txtContent": "[$ApprovalStatus]"
}
  • Yes, that would work but I want the column to be updated instantly. Which cant be achieved with a flow, it would be some delay (15 minutes). :) – Perka Mar 28 at 7:50
  • 1
    You can use a SharePoint designer workflow. – LZ_MSFT Mar 28 at 8:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.