How to create a column that identifies whether or not a document is the latest in SharePoint?

38 views Asked by At

I have a library in SharePoint where I am uploading company documents. The titles of the documents have version numbers in them already. So would like to create a column in the library that will indicate whether or not a particular document is the latest version by indicating 'yes' or 'no'.

1

There are 1 answers

3
Truezplaya On

You would need to write a piece of code such as a timer job to iterate all the items in the list and some logic to

  1. Get all versions of the document (Easy if you have a document naming convention)
  2. Check if the current item has the highest version number in the naming format
  3. Update your field to say yes or no.

Personally in your situation I would upload only the latest versions to the SharePoint document library removing the version number from the title and make it clear to your users these are the latest version, use something like date modified to justify this and make wherever the previous versions are read only in case someone needs to go and read one. I understand date modified may not be the perfect match but it's possibly the best you have in this situation.

Cheers

Truez