locked
Sharepoint custom column based on the Version field RRS feed

  • Question

  • This question is regarding Sharepoint 2007 Version Column. I am trying to make some calculation on a custom column using SP core Version column.

    IF(LEN(RIGHT([docVer],LEN([docVer])-SEARCH(".",[docVer])))=1,"00", IF(LEN(RIGHT([docVer],LEN([docVer])-SEARCH(".",[docVer])))=1,"0", [docVer]))&LEFT([docVer],LEN([docVer])-SEARCH(".",[docVer]))


    Where [docVer] is a custom column with this formula "= [Version]"

    This works only the first time. Each time a document is changed in the document library, it breaks with "!VALUE#" error. The workaround is to go to the custom column "docVer" and just click OK and everything is fine again. I need for it to work all the time without having to go and click OK on the custom column. Or any other idea to get info out of the Version column.

    • Moved by Mike Walsh FIN Monday, June 6, 2011 2:58 PM admin question on calculated column formula (From:SharePoint - Design and Customization (pre-SharePoint 2010))
    Monday, June 6, 2011 1:18 PM

Answers

All replies

  • Hi,

    I suggest you to create an event handler in the list that would be fired when a document version changes and then it will perform the necessary calculation and update the value in your version column.

    I hope this will help you out.

    Thanks,

    Rahul Rashu

    Tuesday, June 7, 2011 4:57 AM
  • Hi Rahul,

    Thanks for your response. However at my work, they are not supporting any development code at this point. Any other ideas from just the UI?

    -SeemaAbdi.

    Tuesday, June 7, 2011 11:49 AM
  • Hi SeemaAbdi,

    It is a known issue for that the Calculated column does not work as expected for specific columns (e.g. Version, ID, Modified). If you want to calculate based on the version column, you can use the Event Handler to update an additional column based on the version column.

    For more infomation about the event handler you can refer to this article.
    http://blogs.msdn.com/b/brianwilson/archive/2007/03/05/part-1-event-handlers-everything-you-need-to-know-about-microsoft-office-sharepoint-portal-server-moss-event-handlers.aspx


    Thanks & Regards,
    Daniel

    • Marked as answer by KeFang Chen Friday, June 17, 2011 3:12 AM
    Monday, June 13, 2011 5:42 AM
    Moderator
  • Hi Daniel,

    I am also trying to update the calculated column based on the version column. Do you have any sample code for the event receiver?

    Regards

    Amit

    Monday, October 31, 2011 5:33 AM
  • Hi

    You can use a SharePoint Designer based workflow in this case.

    BR

    -Uday

    Monday, January 4, 2016 10:40 AM
  • Just an update:  This is still broken on SharePoint 2013 as of April 2016.  When is Microsoft going to fix this?

    Yo Portals

    Wednesday, April 20, 2016 9:00 PM