Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

Is it possible to have a workflow that sends an email when an field changes? I have a form with several fields. The form gets updated often. I'm wanting to send an email to the individual in a particular people picker field. I don't want to send an email everytime the form is updated. I only want to send an email if this people picker field is changed.

so if at first the field is "bob" then the email will go to "bob", but if the form is edited and they change that field to "george", then the ema

share|improve this question
    
Does it matter to you which version of SharePoint this is for? –  Sam Yates Apr 12 '11 at 18:25

2 Answers 2

To do this in a workflow, you will need another field (hidden maybe) that holds the previous value of the person field. Say call it "LastPerson".

Then in your workflow (SharePoint designer), you would have to check if "Person" is not equal to "LastPerson", if that is true, then the value has changed, so send the email. Dont forget to update "LastPerson" with the new "Person" value.

Note: it would probably be easier to do this with an event receiver, but a workflow is fine if you can only make changes though the UI/SPD

OR: you could use the Alerts functionality, and send emails when assignment changes, on say a task list.

share|improve this answer

With something like SharePoint Designer you should be able to use the "Wait for field change in current item" workflow action in conjunction with a workflow variable for this. Steps would be something like this:

  • Set a workflow variable to the current value of the field (you'll want to use a string variable for a Person or Group field)
  • Use a "Wait for field change in current item" action that waits for your field to no equal the value in the variable
  • Send your email
  • Rinse and repeat

You can obviously do this with a custom workflow as well, but probably no need to for something this small and focused.

share|improve this answer
    
Samuel, how would you do the "rinse and repeat" step? I think your method will only work for one change. –  Christophe Apr 13 '11 at 4:07
    
There are lots of suggestions for implementing "looping" workflows out there. I don't want to push for one vs another here, since they are all workarounds in their own way, but in this case probably two workflows that do basically the same thing, run on "modify", and watch for whether the other is running would do the trick. –  Sam Yates Apr 19 '11 at 22:54
    
My point is that lots of these suggestions are not going to work because the "wait for field change" will interfere with the "run on modify". If you have one that actually works in this specific case, it could be useful to point to it. –  Christophe Apr 20 '11 at 3:54

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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