View unpublished pages or draft pages or published pages in SharePoint
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.
This involves two steps
- Add a calculated column which helps to determine the page state using version value.
- Create a new view or update an existing view to display the created calculated column.
Create column to know the page status
- Create a new column and name it “PageStatus” (We will later rename it to “Page Status”).
- Set the type to “Calculated”.
- 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")
- In the library settings, click on the column to edit.
- Change the column name to “Page Status” and click “OK” button.
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.
Erwin
September 30, 2020 - 4:42 PM
This does not work.
When you re-edit the page, the column remains in “Publish” state.
Megan
October 19, 2021 - 7:25 AM
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.