Creating a custom workflow using SP Designer

{lang: 'ar'}

Sharepoint has an out of the box workflow that is quite basic and serves well as long as you don’t have any conditions to be factored when the workflow is initiated. For example, you may have two departments Finance and IT and depending on the department selected, the approval process or the steps involved in the business process might differ. In such cases, creating a custom workflow using SP Desginer will help.

Scenario: Firm XYZ has two departments Finance and IT. They have a common expense approval form and depending on the department selected, the approval email has to be forwarded to the respective department heads. The list used for this example is called ‘Expense Approval’

An outline of the steps are given below:

  • Open Sharepoint Designer
  • Select File > New > Workflow from the menu. This opens Workflow Designer window
  • Enter a name for the workflow
  • Select the list (in this case Expense Approval) to which the workflow is to be attached to
  • Select the options on which the workflow gets initiated – for this example, ‘Automatically start this workflow when a new item is created’
  • Click the Next button to define the workflow steps
  • Click the ‘Conditions’ poplist and select ‘Compare Expense Approval field’ (the name of the list might differ based on what you have created) – ‘If field equals value’ gets populated for you to complete
  • Click on ‘field’ and select ‘Department’
  • Click on ‘value’ and select ‘IT’
  • Click on ‘Actions’ poplist and select ‘Send an Email’ – ‘Email this message’ gets populated for you to complete
  • Click on ‘this message’ – this opens an email window
  • Click ‘To’ and select the ‘IT’ manager to whom the workflow has to be sent for approval
  • In the CC field select ‘User who created current item’
  • Click ‘fx’ in the Subject line – this opens ‘Lookup Details’ window that has two fields, Source and Field
  • Select ‘Current Item’ in the ‘Source’
  • Click ‘Field’ and select ‘Title’ and click ‘OK’
  • Complete the ‘Body’ of the email – Example as follows

Expense Approval request from <created_by_Lookup> on <created_date_Lookup> (steps below)

The following <hyperlink expense report list item> has been submitted for your approval. Please review and approve as required.

Using Lookups

  • To use the Lookup, click ‘Add Lookup to Body’ button
  • Select ‘Current Item’ in the ‘Source’
  • In the ‘Field’ select ‘Created By’
  • Similarly select ‘Created’ for the date

How to Hyperlink to a list

  • Open the list item (any list item for which you are creating this workflow)
  • Copy the url from the browser and paste onto a texpad or notepad – example below

http://referpages.sharepointspace.com/case/bug/Lists/Expense%20Approval/DispForm.aspx?ID=1&Source=http%3A%2F%2Freferpages%2Esharepointspace%2Ecom%2Fcase%2Fbug%2FLists%2FExpense%2520Approval%2FAllItems%2Easpx

  • Copy upto ID= in the url (bolded section)
  • Paste onto the workflow email body and add <a href> tags as shown below

<a href=”http://referpages.sharepointspace.com/case/bug/Lists/Expense%20Approval/DispForm.aspx?ID=

  • To enter ID of the list, place the cursor after ID= and click ‘Add Lookup to Body’
  • Select ‘Current Item’ in the ‘Source’
  • In the ‘Field’ select ‘ID’  - see example below

<a href=”http://referpages.sharepointspace.com/case/bug/Lists/Expense%20Approval/DispForm.aspx?ID=[%Expense Approval:ID%]

  • Now close the tags as shown below and click OK

<a href=”http://referpages.sharepointspace.com/case/bug/Lists/Expense%20Approval/DispForm.aspx?ID=[%Expense Approval:ID%]“>Approve Expense Item</a>

  • Now the workflow for ‘IT’ is complete
  • Create one for ‘Finance’
  • Click ‘Add Else if’ Conditional Branch and complete the ‘Conditions’ and ‘Actions’ – Similar to the above but select ‘Finance’ as the department and change the email ‘To’ field. The other fields in the email and the body remains the same

This completes the custom workflow, It is quite basic and you can expand it further to notify the workflow initiator of approval or rejection.

Click here for reuse options!

Copyright 2009 referpages

No related posts.

Comments

  1. carlos a says:

    Hi

    Can you mark the email with high importance like you do in outlook?

Trackbacks

  1. [...] Define the Conditions as required. This is not explained in detail as the objective of this article is to focus on formatting e-mail. For creating custom workflows, refer to this article here [...]

Speak Your Mind

*

Page optimized by WP Minify WordPress Plugin