Categories
SharePoint

View unpublished pages or draft pages or published pages in SharePoint

Microsoft SharePoint Logo Sometimes it’s necessary to know the status of all the pages before a site is made live. It becomes especially difficult when a team works together on multiple pages and there are number of pages which might have not been published and site owner has to make sure all the pages are published.

We will create a view which can help a site owner to view unpublished pages or draft pages or published pages in SharePoint.

The technique is using the “Version” column to determine the decimal part of the “Version” by subtracting the integer part from the “Version”. So if there is any decimal value in the “Version” then it’s in unpublished or draft state.

Do note that this technique depends upon the “Document Version History” settings being “Create major and minor (draft) versions” for that library.

Document Version History
Document Version History settings

This involves two steps

  1. Add a calculated column which helps to determine the page state using version value.
  2. Create a new view or update an existing view to display the created calculated column.

Create column to know the page status

  1. Create a new column and name it “PageStatus” (We will later rename it to “Page Status”).
  2. Set the type to “Calculated”.
  3. Add the below formula and save the column settings. (Note: The “Version” column will not be available in “Insert Column:” pane so just copy paste the formula.)
=If((Version-INT(Version))<>0,"Draft","Published")
  1. In the library settings, click on the column to edit.
  2. Change the column name to “Page Status” and click “OK” button.
Create a column to show page status.
“Page Status” column creation

Library view to show the page status

We can either create a new view or modify an existing view to show the “Page Status”. For this all that needs to be done is add the “Page Status” column to the view.

Library view to show the “Page Status”

2 replies on “View unpublished pages or draft pages or published pages in SharePoint”

Hi there, how do you deal with draft versions when the numbering is X.11, or some other 2 digit combination? These seem to be excluded from what you’ve got above. The view is great when its X.0 – X.9, but not after that point.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.