Click here to Skip to main content
15,789,776 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have created a workflow in Sharepoint Designer 2010 for approval of documents in a library (see below). I also want this workflow to calculate the actual version of the document by adding a variable import_version (specified when document uploaded) to the Sharepoint version so we can keep track of pre-Sharepoint versions but am having some trouble. The first part of the workflow calculates the variable actual_version when the approval status equals draft, and this part works fine. But I have put in the same step under the section where approval status equals pending after the approval process and if the item is approved. The approval part of this works and the approval status gets updated to approved (which comes after the calculation of version step), but the actual_version variable is not updated/calculated. Any help would be greatly appreciated. I have tried putting the calculation steps in various spots, but nothing works!

Thanks for your time, Kate.

The workflow looks something like this:

If current Item:Approval Status equals 3:#Draft
Wait for document to be Unlocked by document editor
Then Calculate Current Item:import_version plus Current Item:Version (Output to variable: calc2)
Then set actual version to Variable: calc2
Else if Current Item:Approval Status equals 2:#Pending
Start Approval (18) process on Current item with Macdonald
If Variable: IsItemApproved1 equals Yes
Calculate Current Item:import_version plus Current Item:Version (output to variable:calc3)
Then Set actual_version to Variable:calc3
Then set content approval status to Approved with Approved through workflow
Else if Variable: IsItemApproved1 equals No
Set content approval status to Rejected with Rejected through approval workflow
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900