Monday April 09, 2007 Lee Richardson
Recently I’ve been working with Microsoft Office SharePoint Server (MOSS) 2007. Since this is my first post on the topic I’d love to start at a high level about what it is and how it works, but let’s get to the interesting stuff: what doesn’t work well and how to get around it.
Specifically, this will be the first in a series regarding a deficiency in the workflow component of SharePoint that doesn’t allow you to send e-mail to multiple recipients from a multi-value column of a list using SharePoint Designer 2007 (SPD).
This first post will describe the problem, provide lots of screenshots so it can double as a fast introduction to workflows in SharePoint for the uninitiated, and then provide a quick hacky solution.
The Multi-Value Column Problem
Here’s how it should work. You create a list (e.g. Performance Review) and add a column (e.g. “Peers To Review”) and select a type of “Person or Group” with “Allow multiple selections” set to Yes.
(click any image to enlarge)
Now if you add a blank workflow in SharePoint Designer (from the SharePoint Content tab):
And you select the list you created (Performance Review):
Then you should be able to
- Add a “Send an Email” action
- View the message’s properties
- Select the recipient
- Add a function by clicking “Workflow Lookup”
- Select the Current Item (aka the current list item, which is like a row in a spreadsheet and in my example this would be the current performance review that the workflow is being run on)
- Then select the new column “Peers to Review”
But wait. Where’s your column? And here is the problem. The UI of SharePoint Designer filters out all columns that are marked with “Allow multiple selections.”
Simple Hacky Solution #1
Believe it or not the Workflow Engine knows how to send e-mail to a column with “Allow multiple selections” but it’s the SharePoint Designer UI that doesn’t. This means that a simple solution to the problem is this:
- Turn off “Allow multiple selections” for your column (note the warning “This will remove all person values except the first one”)
- Close and reopen the workflow in SharePoint Designer and follow steps above and magically your column will appear in the dropdown

- Finish creating your workflow
- Turn back on “Allow multiple selections”
- Create an item for the list and run the workflow you created in SharePoint Designer
And voila, it works! Both (or all) recipients have received an e-mail.
Sadly, this simple technique isn’t an acceptable solution for the long term. What happens if you want to change your workflow down the road? You may need to turn “Allow multiple selections” back off, thus deleting your multi-user data. A better solution is to create a custom action in Visual Studio and get it to plug into SharePoint Designer. And that will be the topic of my next post:
Multi-Value Columns in SharePoint Designer - Solution #2
---
Note 1: this series is largely in response to the several users having similar problems at: http://forums.microsoft.com/MSDN/showpost.aspx?postid=1443799&siteid=1
Note 2: If you’re interested in the ERD for the topics in this SharePoint post this diagram might be useful to get you up to speed:
Note 3: This is double posted at http://rapidapplicationdevelopment.blogspot.com/2007/04/multi-value-columns-in-sharepoint.html
It seems as though as software developers mature they develop consistency in their approach to just about every aspect of their work, regardless if there is a good reason for adopting a particular practice or not.
For instance, in data modeling I developed the habit of always naming my tables in the plural – Employees instead of Employee, and such. There’s no reason for this convention, other than perhaps I copied what I saw from the Northwind database.
But it’s important to question these practices from time to time, and after over seven years of doing things the same way I have decided to make a change. And for the second time now (see my post The Importance of a Logical Data Model), it was a colleague: Steve Dempsey who initiated the change. So why would one opt for singular names over plural ones?
Developers might chose singular names because they are shorter and require less typing, but this argument never held for me because of tools like intellisense and code generation (not to mention touch typing). But Steve is extremely adamant about singular names for a different reason: because of relationship readability.
For instance, in Sharepoint, workflows relate to events. Specifically, a workflow (singular) is initiated by one and only one event, and an event (singular) can initiate multiple workflows, as is expressed below:

The objective of modeling is thus to express the relationship of a single entity (a workflow, an event, or whatever) to zero or one or many of another entity. So why not just name your entities appropriately in the first place: by making them singular?
Of course now the problem is getting an old dog to remember his new trick. Or is it tricks?
---
note: I am now double posting my blog entries, this post is also available on Blogspot.







