From time to time I hear from SharePoint users that they always have to wait for their developers if they want to have a workflow that is not available 'Out Of The Box'.
In this article I'm going to create a 'Content Approval' lookalike workflow, named the 'Holiday Request Approval' workflow (Human Resource managers can thank me later :-)).
Before we open up SharePoint designer, we need a 'Task' list and a 'Holiday Requests' list, which is based on the 'Custom List' template. So the easiest way is to create a site based on a 'Team Site' and add a custom list.
In the 'Holiday Request' list we create some holiday related columns, such as 'start date' and 'end date'.
The cool thing about creating Workflows in SharePoint Designer is, that it's nothing more than running through a wizard and that you can create pretty nice Workflows without writing a line of code.
In this step we need to provide a title for the Workflow, in our case it is 'Holiday Request Approval'. Next you need to specify on which list or library you want to use it and when you want to start the workflow.
So we need to create a kind of special form where the manager can select his choice. Because I don't want to write one line of code I'm going to let SharePoint Designer create the form.
Once you've added these two fields click on the Finish button to complete the data part of the action.
What we've actually done is, we've created a task for the human resource manager (me) to approve or reject the holiday.
Because we want to use the outcome of this task we need to save the ID of the task that we've created. This is is the variable that we want to collect.
Once we've completed the first action we need to save the respond of the human resource manager. With respond I mean, what is the status and what is the comment that the manager gave.
Find the Action 'Set Workflow variable'. If you don't find it click on 'More Actions...'.
What do we want to collect? Well we want to collect the things that the human resource manager provided in the task that we've created earlier.
How do we know which Task that was, because there could be more than 1 task? Remember that we've saved the ID of the task in a variable, see 'Variable to collect'.
So in the Source drop down box pick 'Tasks' as the selected source. Once you've selected the task list, you have to look for the 'Holiday Request Approve Status' field which we've created earlier. In this field you find the answer of the first question.
this ID is saved in the 'HolidayRequestTaskID' variable which you can load by using the 'fx' button and choose for Workflow Data.
Once you've setup all the fields click OK and do the same for the comments question.
Next we are going to create a new Workflow step. You can do this by clicking on the 'Add workflow step' link on the right side of your screen.
Finish the creation of the Workflow and add a new item in your list, if everything went right you should have a new task created for the human resource manager that you've selected.
So, I've hope that I could show how you can create some more advanced workflows in SharePoint Designer.