SharePoint Reports “Versioning” Through Name Change

Written by:

I have recently had a requirement to Version reports while keeping them visible in a library without having to restore the version.  It also allows for grouping by like titles of reports, so that the title is not unique however, the file name or Name field is.

Initially, a Calculated Value Field called “NameDate” will need to be created.  The function for this field is:

=UPPER[Title]&”-“&TEXT([Created], “mmm-dd-yyyy”), This function will set the NameDate field to this syntax: TEST-OCT-22-2009

Next, a workflow will need to be created in SharePoint Designer Called “ChangeFieldName

This Workflow will need to be associated to the correct Document Library and set to start when item is created.

The First Step of this workflow will copy the name of the file to the Title Field.  The reason for this is twofold: organization and to set the file name properly in the next step of the workflow.

This step is called “ChangeTitle” and will use the Check-Out, Set Field in Current Item, and Check-In Functions:

  • Check out Current Item
  • Set Field Title to Name, if you use name in forms, it will add the file extension,
  • Check in Current with Comment UPDATE-Title.

Please see the first screen shot below (Click on image to expand):

ChangeTitleStep

The Second Step to the Workflow is called “ChangeName”, and it changes the file name to whatever is in the “NameDate” field.  The functions used in this step are Pause for Duration, Check-Out, Update field in current, and Check-In.

We are pausing for 1 minute.  This gives the Calculated Value time to catch up to the workflow to ensure that the title is not left out of the NameDate field, since the title is being copied from the name field in Step 1 of this workflow.

  • Check-Out Current Item
  • Set Name Field to Current Item NameDate
  • Check-In Current Item with comment UPDATE-Name

Please see Screen Shot Below (Click on image to expand):

ChangeNameStep

Finally, I created a View that groups by the Document Title so that all like “Versions” are grouped together making it easy to find the report type that the end user currently wants to look at.

  • Group by Title Descending

See the Final Screen Shot (Click on image to expand):

GroupedView

Posted on October 23rd, 2009 in Technology, Tips & Tricks.