Solved

SharePoint Designer Approval Workflow

Posted on 2011-02-15
10
1,335 Views
Last Modified: 2012-05-11
Hello Everyone,

I need to create a workflow to approve leave plans in a calendar list. Below is the scenario...

Fields:
Employee Name
Process- (One approver for each process (I've about 10 processes)
Start Date - (Leave Start Date)
End Date - (Leave End Date)
Description - (Reason for Leave)
Leave State - (Tentative, Actual)

All the employees plan their leaves tentatively for the entire year in a spreadsheet & upload the details on to a list and view it as a calendar.

This allows us to see the periods where too many individuals planning to take off, and thereby plan the workflow accordingly

To keep the plan upto date, once in every month, employees would review their leave plans for that specific month and confirm the leaves as "actual", if not they would change the "tentative" dates as required.

What I'm looking is to create a workflow...

1) Which would assign a workflow task to the respective process lead to approve or reject, whenever there is a change or new item created in the list.
2) Workflow should shoot out an email to the employee letting them know the approval status with some comments.

Regards,
Sai
0
Comment
Question by:Saichand
  • 5
  • 5
10 Comments
 
LVL 4

Expert Comment

by:djpileggi
ID: 34897822
The way I would approach this workflow is by creating a large if...then...else on the first step to allow for the workflow to know which process lead to assign the task to. (Note:  I suggest using a AD group, not a direct lead process lead account, this way you can change the user in the AD account instead of having to recompiling a new version every time a process lead leaves or changes)  From this, part of the task should get information back from the process lead.  Is the leave request accepted or rejected as well as any comments the approver will want to add.  This will then go to the next step in the workflow to notify the requesting employee.   An email will be sent out to let them know what the result was via email.

This two step workflow should be adaquate for your need.
0
 

Author Comment

by:Saichand
ID: 34915100
djpileggi,

Could you please guide me through the steps? I'm quite new to the SharePoint Designer.

Regards,
Sai
0
 
LVL 4

Accepted Solution

by:
djpileggi earned 500 total points
ID: 34917630
I am going to try and encorporate this for both 2007 and 2010 to make it useful.  I will signify differences if any in the steps.  Please note.  This is a very simple version.  It will work, but feel free to add more once you get an understanding for a SharePoint designer workflow.  Test it out.  It may not work exactly the way you want on your first try.  However, this is a great step forward for you.  Welcome to a whole new world of BPM.

1

Start up SharePoint Designer, click on the File, click on open site, enter the site URL where the list is housed.

2

In 2007 Click on File > New > Workflow.  In 2010 click on List Workflow. (I am going to use a workflow tied to a list this time. Also in 2010 it will automatically give you a list of lists and libraries (redundant isnt it?) Select your particular calendar list you have created.  In 2007 you need to give the Workflow a name, select our calendar list and when/how you want the workflow to kick off. In 2010 Just give the workflow a name and description. Hit next for 2007 and OK for 2010.

3

In 2007 at the bottom of the Workflow creation GUI click on Workflow variables.  In 2010 click on Local Variables.  At this point with both versions click Add. For name type TaskID. In the Type drop down select List Item ID. Then click OK twice.

4

In 2007 the first step select the drop down in condition and select If current item field equals value.  In 2010 ensure the orange bar is flashing in Step 1 box.  If so click on Condition in the ribbon and select If current item field equals value.

5

In either version, click on field, select the field that has to do with your process.  Make sure the condition is equals. Click on value and put the value of your first process.  If its a drop down in the list it will allow you to select automatically (recommended).  If its a fill in. Make sure there are no typos. (not recommended.  You dont have control over your end users)

6

In 2007 click on action (note you may have to click on view all actions) and in 2010 click on Action in the ribbon.  Select Data From User.  Click on Data. Click Next.  Give the name of the task. (For Example: Process Approval)  Fill in the description(instructions).  Click next. Click Add.  Put Field choice of Decision in.  Put in Description.  Select Choice out of Information type. click next. Put in your choices.  Approved Denied etc each on their own line. Dont allow blank choices. Click Finish.  Click Add again.  Enter a field name in.  For example: Reason.  Enter description.  Put either single line of text or multiple lines of text depending on how talkative your approvers are. Click next.  Either allow or disallow blank values. Click finish. Click Finish.  Click on this user in the action.  Use the special AD group you created so you do not have to change this when people change. Click on Variable: collect and choose the variable we created.  If you wish feel free to delete the auto created variable collect if you wish. (Just a good practice)

7

If you are not done adding all your processes in comlete this step. If you are go to step 8.  In 2007 at the bottom of your step you have the ability to click add Else-If branch.  In 2010 click Else-If Branch on the ribbon. Repeat Steps 4 - 7

8

In 2007 on the far right, click Add Step.  In SharePoint 2010 click in the white field below the first step you made and click Step in the ribbon.

9

Use your variable you created in step 3 to find the results and change your items fields you have created. Do this by creating just an action (no condition is necessary).  Use the action Set Field in current item.  Click on field and select unique approved options or whatever.  Then change it to equal the response given from the task that was completed.  Again you find this using the TaskID variable to find the the correct task in the task list.  Also if you want to capture the comments.  You can do that as well.
0
 

Author Comment

by:Saichand
ID: 34918665
Thankyou very much for the detailed steps, I would explore this tool more often going forward and might need your help in this forum...

I'm using 2007 and I could do it till step 8, however in step 9 I couldn't figure out how to change the approval state field to equal the task ID variable.

Thanks again, this would be very useful to me.

0
 
LVL 4

Expert Comment

by:djpileggi
ID: 34918798
When trying to get information out of other lists in your workflow.  If you think of it as a SQL query.  It really helps alot.  When you use the action Set field in current item.  You are going to draw information from a different list (think table in SQL)  Click on Field.  Change it to the field you are changing. For this example I am going to call ProcessApproval.  This is part of the list you are working with.  Easy enough.  Now to get the information out of another list.  Click Value. Click the function button.  Select your data source.  In this case the Task list where the tasks are being created.  For simplicity I will just say Tasks. The field from source is the field you want the value from.  So in number 6 above I called it Decision.  The next is to find the list item.  This is the third drop down box.  You want to select ID which is the task ID.  The last box click function.  Select Workflow Variable.  Then select TaskID which we created way back in step 3.  click ok.  Your done.  Easy.  When you think of it as a SQL Statement, its a select statment.

SELECT Task(table... list in this case):Decision(Field in the table/list) WHERE ID(the task table/list key)=TaskID(our variable that knows which task we need)
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 

Author Comment

by:Saichand
ID: 34961060
Just one question, in number 6, using the link data you have created a field "Decision" through custom task wizard to collect whether it is approved or rejected, however I couldnot see the "Decision" option under field from source dropdown. Did I miss something?
0
 
LVL 4

Expert Comment

by:djpileggi
ID: 34961136
I was using that as an example.  Decision was the name I gave the field.  For that field I suggested using a 'choice'.  When you type in the choices use the decisions you want to give your leads.  Approved and Denied I would assume.
0
 

Author Comment

by:Saichand
ID: 34962660
I got it, Thanks for clarifying... The Workflow is working fine when I open the task. How can the approver get notified when there is a workflow created?
0
 
LVL 4

Expert Comment

by:djpileggi
ID: 34962872
When the task is created, it should automatically send an alert out.  If it is not, just check in the Task Library that you are using to house the tasks, go into List Settings, and in Advanced Settings > make sure email notifications are turned on.  Or you can experiment and try different things with the workflow like adding send email action.  dont be afraid to experiment.  Not when this goes production though.  Have a copy somewhere else.
0
 

Author Closing Comment

by:Saichand
ID: 34980966
Thankyou very much..!!
0

Featured Post

Free Gift Card with Acronis Backup Purchase!

Backup any data in any location: local and remote systems, physical and virtual servers, private and public clouds, Macs and PCs, tablets and mobile devices, & more! For limited time only, buy any Acronis backup products and get a FREE Amazon/Best Buy gift card worth up to $200!

Join & Write a Comment

Work Over Net is a new and very powerful collaboration product. With its new easy interface it is becoming very competitive to other similar products like webex and office interactive. WON 2010 have the standard business tools needed for multi-offic…
When installing SharePoint 2010 RTM I came across a strange error, I was getting timeouts during the installation. I searched the web and found the best solution to be found here (http://social.msdn.microsoft.com/Forums/en-US/sharepoint2010genera…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now