SharePoint 2010: Use Alerts and Views to Send Selective Emails

SharePoint 2010: Use Alerts and Views to Send Selective Emails

Sending email alerts to different users depending on the values in a new list item is a requirement that might leave many users reaching for SharePoint Designer or asking IS to rustle up some code. As it happens this can be achieved through use of a no-code solution, as I will discuss here.

Consider this user brief; "I'd like users to enter a training request into SharePoint. Depending on which Department the user works in, a notification email will be sent to the manager for that Department." 

It turns out that this is achievable just creating a few custom views, and alerts on a custom list. No coding, no SharePoint Designer, no IS Involvement. All because you can set Alerts on particular Views. 

So, we start with a custom list like this one; 

Custom List

You can see the list in more detail here. All I've done is rename the Title field to be Course Title, and the Created By to be Requested By. In the real world you might have a list of courses pre-defined so you'd create a Choice column or Lookup column for the user to choose. 

Custom List Columns

I've also added my own choice column of 'Requesting Department' that the user will fill in when they create a request; 

Column Details 

You can see for this example I've added three example departments, IT, HR, and Accounting. 

This will be the list that Training Requests go into. Now we have to get things ready so our different department heads will get their emails. We do this initially by creating a View of our List from the ribbon; 

Create SharePoint View

We create a view based on the existing AllItems View, as that saves us some typing. 

Create View from Existing View

Our first new view will be called "IT Requests". Notice we create a Public View, order it by Modified Date (so the latest items are always at the top), and the important bit is we add a filter on there to only show items in this new view where Requesting Department is IT. 

Create IT View

Once the first view is created when we create our next views we can base them on the IT Requests View we just created. 

Create Next View

Then all we need to change is the name of each new view, and the Department value in the filter; 

Create Next View Filter

I'll leave the last View to your imagination, as it's basically the same as the other two... 

So, I now have three custom views on my training Request list. Each custom view shows only the items from a specific department and nothing else. 

I can now go ahead and create an alert, which you'll be able to do from the Ribbon over the list; 

Set Alert

You've probably created Alerts before, but if not, you simply need to know that they are used to notify people of changes to list items. The screenshot below shows the options available in that you can select to be notified on all changes, or just the changes of others, and select whether you are notified immediately or have a daily or weekly digest instead. You can also nominate others for the email, not just yourself... 

Set Alert On List View

So we create an alert as above, and our IT Manager will be emailed on a daily basis whenever new requests are added to the list, but only those that are shown in the IT Requests view. This is the really neat bit about Alerts - you can subscribe them to specific Views and therefore they become much more powerful in that you send send alerts for specific filters and conditions (of the view). This is true in SharePoint 2007 as well as 2010 by the way. 

We repeat the above to create Alerts for the HR and Accounting views with different managers specified. 

Creating a new request in the list looks like the screenshot below. In the real world you might want to capture more information; 

New Training Request

At the end of the day, the specified IT Manager will get a digest of all training requests by folk in IT. The course title and name are visible in the email. If I'd added a few more columns the data would also be shown in here, in perhaps a prettier way, but this is a simple example! 

Alert Email Example

There we have it. Code free solution to selectively email managers of different departments. All because of the cool feature that Alerts can be subscribed to different views. Nice.
Sort by: Published Date | Most Recent | Most Useful
Comments
  • What if I need to limit the infomation sent in the alert email? Say I just want the email to say that a change has been made to a list (or list view) I am watching? (The idea is to keep potiental PII from being emailed). Thank you in advance for your thoughts!

Page 1 of 1 (1 items)