sharepoinTony

@info – The practical side of SharePoint

Using alternate list data in a SPD Workflow.

Posted by sharepoinTony on March 27, 2009

Background:  MOSS 2007, SharePoint Designer 2007 used to create the workflow.

I have a user request workflow which is initiated when a new item is created in a user request list.  The user is required to select a ‘location’ when submitting the form (this form is used by many different locations in the USA).  Depending on the type of request an approval may be needed and I send an email to a designated approver based on the location that was selected by the user.   The user doesn’t know who the approver is and the support desk staff may or may not know either.  I currently am using hard-coded email addresses for the approvers in my workflow.  I ‘set’ a column with the email address once it is determined in the workflow and in later steps use that field in the email message.

What I would like to do is use another list to allow us to maintain the approvers, their appropriate email address, and the location where they are allowed to approve requests.

Here is how I did it:

  1. Edit my workflow in SharePoint Designer (SPD)
  2. Navigate to the appropriate step and conditional branch.
  3. Modify the “Set” field line,  selecting my  ‘other list’ as Source in the “Lookup Details” section of the Define Workflow Lookup window (note that this window opens when you select another list in the Source drop-down).
  4. Select the field in that source that I want used in the user request list for the Field selection of the Lookup Details section.
  5. Under “Find the List Item” section, I used the other list Location column in the Field selection.
  6. I then used the current list Location in the Value selection
  7. Click OK to close the Define Workflow Lookup window.
  8. Click YES to the warning (if it displays) that says “The lookup that you defined is not guaranteed to return a single value.” etc.. “Do you want to continue?”
  9. Finish your workflow to save and close the Workflow Designer window.
  10. Test it out – The appropriate approver is pulled from my “approval maintenance” list and placed into the current list item in my user request list!

This took me a little effort to figure out, it isn’t clearly documented and I couldn’t find it in the SPD help.  Maybe someone else will be able to use this, and shortcut their search effort to figure out how to do this kind of lookup in a workflow.

Advertisements

2 Responses to “Using alternate list data in a SPD Workflow.”

  1. Magnificent beat ! I would like to apprentice while you amend your site, how could i subscribe for a blog website? The account helped me a acceptable deal. I had been tiny bit acquainted of this your broadcast offered bright clear ideaI am extremely impressed with your writing skills as well as with the layout on your blog. Is this a paid theme or did you customize it yourself? Either way keep up the excellent quality writing, it’s rare to see a nice blog like this one nowadays..

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: