1

I have two people, Frodo and Gandalf.

I have a list with the person/group site column "Assigned To"

I have a view "View1" that only shows items where Assigned To is empty

I have another view "View2" that only shows items where Assigned To is not empty

I've configured alerts on this list so that Frodo gets an alert when anything happens to items in View1, and Gandalf gets an alert when anything happens to items in View2.

They both receive emails when they are supposed to, however, Frodo gets an additional email at the same time as Gandalf when the list item is transferred from View1 to View2 by changing that field.

Why is this happening? Does it have something to do with OnUpdating and OnUpdated event receivers? I've tried changing the alerts to be when "existing items are modified" instead of "All changes" but it doesn't seem to make any difference.

1 Answer 1

1

It's because you ARE modifying an item on Frodo's view - when you set the "Assigned To:" field to a certain value the item is still within the view where all the items have that field blank.

Think what the software is doing:

  1. An item on Frodo's view is modified, therefore an email will be sent

  2. Process the change - in this case, the field is not blank anymore, so it will no longer be displayed in that view

  3. When you switch to Gandalf's view, all the items in the list are scanned and the ones with a non-blank "Assigned To:" field are displayed. In this case, the item previously modifyied will be a part of Gandalf's view.

4
  • if the alert is processed before the change is processed, then it makes sense for Frodo to get an alert but not Gandalf. If the alert is processed after the change is processed, then it makes sense for Gandalf to get an alert but not Frodo. But in my case BOTH get an email
    – Nacht
    Aug 7, 2014 at 21:11
  • The alert is processed after the change is processed. But the item changed was at the time on Frodo's view. So Frodo gets an email because an item was changed. Gandalf gets an email because an item was added. Your alert is for "anything happens", which includes both those events. I don't know how familiar you are with programming, but in this case you can think of the alerts acting like interrupts. Aug 8, 2014 at 15:04
  • I am indeed familiar with programming, in fact I have built event receivers for lists such as these. This is what I'm confused about - there is no item added, only modified. The OnAdding and OnAdded event receivers will not get called - it's not an entirely new item. It seems to me perhaps it's getting called on both OnUpdating and OnUpdated. I just wanted to see if anyone else knew for sure
    – Nacht
    Aug 11, 2014 at 14:06
  • Note that in the case of an item switching from one view to another: if we accept that some people would prefer A) only the first view's alert to trigger, some would prefer B) only the second view's alert to trigger, and some would prefer C) both alerts to trigger, it's clear that we can't please everyone. With that in mind, it's clear that C is the best approach, because it's much easier for the A and B camps to ignore any extra alerts they may receive, than it is for the C camp to discover that changes occurred for which they expected, but did not receive, an alert. May 6, 2016 at 19:31

Your Answer

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

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