SharePoint Designer Approval Workflow

Hello Everyone,

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

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.

Who is Participating?
djpileggiConnect With a Mentor Commented:
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.


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


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.


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.


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.


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)


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)


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


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.


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.
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.
SaichandAuthor Commented:

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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

SaichandAuthor Commented:
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.

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)
SaichandAuthor Commented:
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?
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.
SaichandAuthor Commented:
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?
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.
SaichandAuthor Commented:
Thankyou very much..!!
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.