0

I would like to flag up all minor versions of documents in a document library. It's probably one for a calculated field but I am having trouble figureing out how to do it?

Basically what I want is to say if the version column = anything but *.0 then give me a value. Once I have a value I can make a view to show everything in that value.

Any Ideas? Hope this makes sense.

2
  • 1
    You can use the JSLink for this. You can change the rendering of document list item using it.
    – Ramesh
    Commented Jan 23, 2017 at 14:03
  • Explain how and provide an example please. Commented Jan 23, 2017 at 14:39

2 Answers 2

1

Programming a Client-Side-Rendering script and attaching it with JSLink, so the Version field is presented different is the 2013 solution.
That takes some scripting

If you read this: http://www.viewmaster365.com/#/How (and read the Pros & Cons!)

and paste this Formula in a Calculacted Column set to datatype=Number
(you can leave out the original Version column from the View)

= [Version] 
&"<img src=""/_layouts/images/blank.gif"" onload=""{"
&"var row=this;while(row.tagName!='TR'){row=row.parentNode}"
&IF(  FIND(".0",[Version])   ,   ""  ,  "row.style.backgroundColor='pink';"  )
&"}"">"

It should color any row not containing a x.0 Version pink,
and work just everywhere this Calculated Column is displayed

This is all Client Side so you can't use View Filtering.

You could however change it to:

&IF(FIND(".0",[Version]), "row.style.display='none';" , "row.style.backgroundColor='pink';" )

and all those x.0 Rows will be hidden

0

I found a way of doing this but it's certainly not the most fool proof and wont work in every situation

I created a view and set it so it only shows items/documents that have .1, .2, .3 etc in the version column. enter image description here

This is OK if you limit the amount or minor versions, I am sure there is a better way to achieve this. If anyone knows please comment or submit a better answer.

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.