Geeks With Blogs
Stephanie Grima C#, ASP.NET and my life.
Document Approval and Transfer a document to
another library within the same site/sub-site.
 

Scope:

Imagine you have a document library where you keep all documents/PDFs which are pending and thus require approval before sending them to another document library for everyone to view. In this tutorial I created a form in which the user either approves or reject the document together with a comment (mostly used if user rejects and wants to write down what he wants changed). If the user’s choice was that of ‘Approved’, a copy of the file is sent to the document library (in my case: Approved Documents) and the current item is then deleted. If the user rejects the file, the workflow is stopped and the comments of the user are kept so that the author may update the file according to what is required. Enjoy!

 

1.       In SPD, go to File > New > Workflow.
2.       Name it “Approve Doc” and attach it to your SharePoint Library… In our case “forApproval”.
3.       Check the box for Allow the workflow to be manually started for an item.
4.       Click Next > to Continue.
 
 
 
5.       Name the first step as “Assign Review”.
6.       No conditions.
7.       Actions > Collect data from a User.
a.       Click on Data and a window is displayed.
b.      Click on Next.
c.       Name: Review Document.
d.      Description: Please review the document and then fill out this form and click Complete Task to finish your task.
e.      Click on Next
f.        Click on Add. This will display yet another window.
                                                               i.      As a field name write: Would you like to approve this document?
                                                             ii.      As information type choose: choice (menu to choose from).
                                                            iii.      Click on Next.
                                                           iv.      As choice write down:
1.       Yes. This document should be approved.
2.       No, it is not yet ready.
                                                             v.      Choose Checkboxes and un-tick Allow blank values?
                                                           vi.      Click on Finish.
g.        Click on Add again.
                                                               i.      As a field name write: Comment.
                                                             ii.      As information type choose: multiple lines of text.
                                                            iii.      Click on Next.
                                                           iv.      Un-tick Allow rich HTML?
                                                             v.      For number of lines, write 10.
                                                           vi.      Click on Finish.
h.      Click on Finish.
i.         Click on this user and choose the user or group from an existing list example servername\stephgrima.
j.        Click on Variable: Collect choose Create a new variable. A new window is displayed
                                                               i.      Name: ID of Reviewer
                                                             ii.      Click OK
8.       Actions > Log to history list.
a.       Click on this message and write down what you want to keep logged. In our case: Document Review has been assigned.
 
 
 
The first workflow step has been complete. Click on Add a workflow step to add the next step in our workflow.
1.       Name the second step as “Save Reviewer's Choice”.
2.       No conditions.
3.       Actions > Set workflow variable.
a.       Click on workflow variable.
b.      Choose create a new variable… a new window is displayed.
                                                               i.      Name: Choice of Reviewer.
                                                             ii.      Type: String.
                                                            iii.      Click OK.
c.       Click on Value and choose FX. A new window is displayed.
                                                               i.      On Lookup Details choose:
1.       Source: Tasks
2.       Field: Would you like to approve this document?
                                                             ii.      On Find the list item choose:
1.       Field: Tasks:ID
2.       Value: Variable: ID of Reviewer
                                                            iii.      Click OK
4.       Actions > Log to history list.
a.       Click on this message and write down what you want to keep logged. In our case: Reviewer's Choice was logged.
 
 
 
 
 The second workflow step has been complete. Click on Add a workflow step to add the last step in our workflow.
1.       Name the third step as “Proceed according to Reviewer's Choice”.
2.       Conditions > Compare any data source.
3.       Click on value then click on FX. A new window is displayed.
a.       Source: Workflow Data
b.      Field: Variable: Choice of Reviewer
c.       Click OK.
4.       Click value and write down the following: ‘Yes. This document should be approved.’. This is the choice the reviewer would choose if he/she wants to approve the document.
 
5.       ActionsCopy List Item
 
6.       Click on this list and choose Current Item. This is because we want to make a copy of the current list item (the document that has been reviewed).
7.       Click the other this list and choose the library you want this list item to be copied to. In our case, it is the Approved Documents library.
 
8.       Actions > Delete Item
9.       Click on this list and choose Current Item. I chose to make delete this document because I now have a copy of it in the Approved Documents library and so I will not be needing it in forApproval library anymore.
 
10.   Actions > Log to history list.
a.       Click on this message and write down what you want to keep logged. In our case: Reviewer accepted the document.
Since we need to make another condition for when the reviewer chooses to reject the document, we need to add an Else-If Condition. This is done by clicking on the Add ‘Else If’ Conditional Branch.
1.       Conditions > Compare any data source.
2.       Click on value then click on FX. A new window is displayed.
a.       Source: Workflow Data
b.      Field: Variable: Choice of Reviewer
c.       Click OK.
3.       Click value and write down the following: ‘No, it is not yet ready.’. This is the choice the reviewer would choose if he/she wants to reject the document.
4.       Actions > Send an Email
a.       Click on this message and a new window is displayed.
b.      Fill in To: with the author of the document and write a related subject and body. On the right there is a basic example.
 
 
 
 
5.       Actions > Stop Workflow
a.       Click on this message and write down what you want to keep logged. In our case: Reviewer rejected the document.
 
The workflow is now finished. Click on the Check Workflow button to make sure that there are no errors and then click on Finish. You can now make use of the workflow in your SharePoint portal.
Please note that this has been my first blog ever, so any comments, tips or questions are appreciated :-)
Posted on Monday, September 1, 2008 5:51 PM Office SharePoint Designer | Back to top


Comments on this post: Approval of Document and Transfering it to another library within the same sub-site.

# re: Approval of Document and Transfering it to another library within the same sub-site.
Requesting Gravatar...
I'm having a problem with c.i. value doesn't display Would you like to approve this document as a choice. What am I missing?!?
Left by Staci Mildenberger on Oct 01, 2008 4:17 AM

# re: Approval of Document and Transfering it to another library within the same sub-site.
Requesting Gravatar...
Can you please specify in detail your problem?

Thanks, and sorry for not replying back earlier. Wasn't available.

If you have solved it, I would appreciate the solution so that if another user encounters it, he/she will know what to do.

Thanks once again.

Steph Grima
Left by Steffi on Oct 08, 2008 2:18 AM

Your comment:
 (will show your gravatar)


Copyright © Steffi | Powered by: GeeksWithBlogs.net