5

We are using the Document Approval workflow. Using SharePoint Designer I have modified the OOB workflow so that it logs additional information - mainly so far making sure that the name of the document (item) being approved is included in all logged history messages.

I would like to also include the Version of the document which the workflow has been run on. This would help us for auditing documents later (these are mostly project documents which go through many iterations over a project lifecycle and need to be approved at various gates).

The only way I have found to get the document version in a Workflow is to use a lookup on the Document Library: Lookup version from Doc Lib

The problem with this is that the Workflow is now hard-coded to a specific Document Library and in order to use it in another Site (or another Document Library within the same Site for that matter) I need to edit the Workflow every time.

Is there a portable way to get the Version of the Current Item in a Workflow, using SharePoint Designer?

Note - if I have 'Current Item' as Data Source (setting a variable or in String Builder) then the options I have for the Field are:

  • Approval Status
  • Created
  • Created By
  • Encoded Absolute URL
  • GUID
  • ID
  • Modified
  • Modified By
  • Title

In other words, no Version or Current Version.

0

1 Answer 1

5
+50

Sure. Just add Current Item > Current Version, and you don't need to reference the library.

enter image description here

6
  • Doesn't work for me: I don't have 'Version' or 'CurrentVersion' as fields for 'Current Item'. I've updated the question to show what 'Current Item' options I do have.
    – AAT
    Jan 18, 2017 at 9:36
  • Do you use 2010 och 2013 workflow? I use 2013...
    – Benny Skogberg
    Jan 18, 2017 at 9:42
  • It's a SharePoint 2010 workflow, I guess that is the difference. We are using SharePoint Online (O365) and it seems only ShPt 2010 workflows are available. I will ask the admins if we can find a way to use a 2013 workflow.
    – AAT
    Jan 18, 2017 at 9:46
  • 1
    @AAT You're welcome! You should be able to use 2013 workflow in SharePoint Designer on Office 365. I use the Global admin account, but I'm pretty sure it should work with a site collection admin as well
    – Benny Skogberg
    Jan 18, 2017 at 10:03
  • 1
    I finally got started with looking at a 2013 Workflow. I still have the same problem if I use a Reusable Workflow: however if I use a List Workflow then I do, as per your answer, get CurrentVersion as a field. I believe that (despite the naming!) I can in fact re-use a List Workflow with some care, so I will push ahead with this approach and see how it goes. I guess the point is that a List Workflow already has a List reference built in...
    – AAT
    May 24, 2017 at 12:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.