5

I have a list with a people or group field, it is set up to allow only one person or group to be selected.

I would like a user to receive a notification when a list item is assigned to them.

I tried the OOTB list alert which allows me to select a Change Type - Only send me alerts when/Existing items are modified. But this is too general, as I'm not interested in tracking when any field changes only the 'assigned to' field.

I also tried making a custom list view with only the 'assigned to' field selected in the hope that the notification would only be trigged when the 'assigned to' field is modified (i.e. the item is reassigned) but this was not successful either.

Am I on the right path? Could a better configuration of an alert, perhaps combined with a custom view be the answer?

I also noticed that there is a useful-looking option in List/Advanced Settings/E-mail Notification (send an e-mail when ownership is assigned or when an item has been changed) - but the '...or when an item has been changed' part seems too general for my needs.

Thanks for any suggestions. David

3 Answers 3

2

You need to write a workflow that fires when the item is modified. in this workflow you can check if assigned to is modified or not. If assigned to is modified then send email or whatever you need.

1

Have you had a look at using the Task content type as a base as a Task will by default notify the new Task owner by email

2
  • That's actually a good point. I've inherited a Sharepoint deployment which has made some use of Tasks Lists, but not as much as it should have done. Therefore, I have to manage what is there by adapting a standard List to behave differently and send notifications. I believe that a new Task List could be created and associated with the legacy List and used to manage tasks. One thing I am unclear on is whether a List item is capable of creating new Tasks (on the associated Task List) - for instance the List item is edited>Assigned To x>Task for x created>reassign to Y>does Y have a new Task?
    – Tally
    Feb 1, 2018 at 9:35
  • That sounds like a complicated solution, perhaps it would be better just to leave those lists as they are, and manage to email notifications via some common workflows / flows Feb 2, 2018 at 23:22
1

Since this question has received quite a few views I thought I would be helpful and post a bit more of an explanation, I've learnt a bit more since I posted that question, but vividly remember the frustration of learning SP Workflows...

So I have expanded on Tarek's answer and provided a step-by-step instruction.

Open Sharepoint Designer (it's free to download from MS).

There are two fields being used:

Assigned To (you can call your field what you want, but this is the person doing the Task).

Text Name - this field is simply referenced by the workflow. When your new task (or item) is created, a name is selected to do the task. Your workflow will copy the user name it finds in the 'Assigned To' field.

  1. Create a field called 'Text Name'.

Create a single line of text field and name it 'text name'

  1. In Sharepoint Designer - Go to your Sharepoint List or Task List or Document Library. My List is called 'NPI'.

breadcrumb of Site Collection to List Name

  1. Create a new 2010 Workflow (don't worry this works with SP 2013 too). Then click OK to save.

Create List Workflow

  1. Now the harder bit - you need to select the commands, fields and values which run the workflow and trigger the email to be sent out.

new workflow screen

  1. This is the code I've used to create the email alert:

    If Current Item:Text Name not equals Current Item:Assigned To Email Current Item:Assigned To Set Text Name to Current Item:Assigned To

  2. How to add code:

If Current Item:Value

  1. Then click on the blue 'field' text and select the 'Assigned To' field (remember there are only 2 fields being used here - you need to choose your equivalent to 'Assigned To').

Click on Field and select 'Assigned To'

  1. Change to not equals as the operator

configure workflow

  1. Next click on the blue Value text, then select the three little dots '...' button. Then in the menu that follows click on Workflow lookup for a user then click Add (even though you have not selected a name - that is fine). In the Current Item field select Text Name.

enter image description here

  1. Next type Email in your code (see picture below)

    • Select These Users
    • Next to the 'To' field there is a book/directory - click on that icon.
    • Select Workflow lookup for a user and select Add
    • Data Source = Current Item
    • Field From Source = Assigned To
    • select 'Email address, semicolon delimited'

enter image description here

  1. Create the email notification template. Again, embed field:value in to your email message to make use of the Sharepoint data to your advantage.

Draft email template

  1. Embed a 'dynamic' link in your email - link to view the current item.

    • To get the code, just view an existing item (choose any) in your List/Task List/Doc Library. When you are viewing one, copy the url from the page you are viewing. Your url will have an ID tacked on to the end.
    • When you paste the link in to your SP Designer code you need to delete the ID and replace it with the variable: %Current Item:ID% - see the picture below, as Sharepoint is fussy about the exact text and symbols used.

use %Current Item:ID% as a variable when configuring the link to display the current item

  1. That's the email done. Next finish off the rest of the coding. In the next line type Set then press Enter. Then select 'Set field in current item'.

Set field to...

  • Select the blue field text and choose 'Text Name'.
  • Select the blue Value field, then click on the '...', then 'Add or change lookup.

  • Select Data Source = Current Item

  • Select Field From Source = Assigned To
  • Return Field As = Display Name, Semicolon Delimited

It should look like this:

enter image description here

  1. Check for Errors and Save/Publish.

  2. Workflow Start Options

Ensure Start Options are set to allow workflow to start when:

  • item is created
  • item is changed

start options

  1. Testing - set yourself as the Assigned To. Then ask a friendly user to test it. Change the Assigned To to 'friendly_username'; do they receive the email notifying them of the task?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.