0
Users want to get notified when someone changes a date, easy! But they don't want the notification first time the date is set.

Is it possible to do?

So, when date goes from empty to something, no notification. When date changes from one value to another, send notification.

Accepted Answer

Monday, May 20 2019, 02:12 AM - #Permalink
0
I did end up doing it in two steps.
1, notification rule fires on date field is changed, the notification runs an App script
2. App script checks if the date before changed had a value and if so send an email
The reply is currently minimized Show
Responses (2)
  • Accepted Answer

    Tuesday, March 12 2019, 07:10 PM - #Permalink
    0
    If the date field is being changed on a form by a user, you could use a combination of Form Actions and JavaScript to detect when the Date field is changing from one valid date to another.

    If it's happening in a Transition that doesn't involve a form then you can use AppScript or ModScript in post-transition context to compare the value with the field's DB value (see "Field . GetDbValue()")

    I think in either case, as David noted, you'll need to set a boolean field that indicates that the date field changed. That field is used in the Notification Rule.
    The reply is currently minimized Show
  • Accepted Answer

    Tuesday, March 12 2019, 04:26 PM - #Permalink
    0
    There doesn't look to be anyway of doing this with standard notification rules as the only option is for when the date field changes.

    There might be a way of doing it with scripting, but can't help you with that.

    My only other suggestions are a but "ugly". Add a field (perhaps a check-box) and use a form action to set it when the date field changes from one value to another. Or just include the last change history to the email notification to show what the change was - and users could just ignore/delete the email where it changed from None.
    • Mikaela Nilsson
      more than a month ago
      Thank you both for your input!
      David, when you write "just include the last change history to the email notification", can you explain how I can do that? That was one of my thoughts too but couldn't find how to include the old value of the date field.
    • David Sheaffe
      more than a month ago
      You could use $CHANGES(1) as a tag in the email notification template. That will show the change history for the item. The (1) means that it will show only 1 (ie, the last) change (making is (5) will show the last 5).

      Alternatively, you could use $CHANGEACTION, which returns the action and user that caused the notification to be generated, along with the date and time the action occurred
    The reply is currently minimized Show
Your Reply

Recent Tweets