2

I created a document library. The library has the following version settings below. I have some documents which are published and have a major version. Other documents are draft and has a minor version. How can I group or filter on published status? I would like to filter on draft documents? Or filter on published documents.

enter image description here

UPDATED

I created a calculated field like Domenico suggested me. It looks like when I add the calculated field it works. When I modify some document in the library it doenst work anymore. I see #Name? as value, but I expecting "Published" or "Draft". See printscreen:

enter image description here

3 Answers 3

0

Ciao, you should create a calculated field based on version. And then group your documents by the new calculated field.

Here the full explanation:

  • Create a calculated field based on Version; Formula syntax is like Excel formula (see link;
    https://msdn.microsoft.com/en-us/library/office/bb862071(v=office.14).aspx )
  • You should split the version string by the "."(dot) character and then check if major an minor version define a document as Draft or Publish (apply your criteria here)
  • Draft | Publish, are two of possible values of your calculated field
  • Create views that filter or group documents by that value
8
  • Do you have more information about the calculated field? Do you know the formule?
    – Ola
    Commented Apr 18, 2017 at 12:26
  • I have updated my answer. There is a link to a page that explains calculated field's formula.
    – Nico
    Commented Apr 18, 2017 at 12:31
  • If you explain me which is the criteria to define a document as Draft or Published. I might help you more.
    – Nico
    Commented Apr 18, 2017 at 12:40
  • Ciao @Ola, has my answer resolved your issue?
    – Nico
    Commented Apr 19, 2017 at 8:26
  • Hi, thank you very much. Please give me an example of the formule to filter on all documents with major versions.
    – Ola
    Commented Apr 19, 2017 at 10:54
0

Is your pages view showing an "Approval Status" column?

You can filter on that column, or you could create views that show pages according to the status.

1
  • I dont have column "Approval Status" because this option is disabled. We dont want to enable this option.
    – Ola
    Commented Apr 19, 2017 at 10:55
0

Answering an old post in case it helps someone. Like Marc said we can use the "Approval Status" column (internal name - "_ModerationStatus") to solve the problem. We can either add this column to an existing view or create a new view using PnP PowerShell.

 Add-PnPView -List "Site Pages" -Title "Pages with Approval Status" -Fields "Name","Modified", "_ModerationStatus"

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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