This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Notifications containing both old and new value for changed attributes

Hi,

We're using the out-of-the-box AR approval workflows to allow Primary and Secondary owners to approve/reject membership changes to groups they are responsible for. This is working fine, however, I would like to have an additional process (probably workflow) that notifies the managers of the group when approval is enabled/disabled or when a manager is added/removed/changed. This to prevent delegated AR admins removing the manager, then quickly adding a member, then putting the manager back in. I'd like a notification to be sent to both the new and the old manager(s) when this happens.

So, if Manager A is replaced with Manager B, I would like both A & B to receive an email saying "FYI, for group X, manager A has been replaced with manager B".

I built a workflow that's triggered when the relevant attributes are modified, but I don't know how to display both the old value and the new value inside the notification. Can this be done with the native workflow options? Or does this require custom scripting? Any pointers would be highly appreciated!

Thanks; regards,

Michiel

  • Michiel,

    If you are using Active Roles 7 (and I highly recommend you do!), this functionality is built in to workflows. We added a workflow step called "Save Object Properties" that is designed specifically to save the value of attributes BEFORE they change.

    These saved values can then be used directly in notification activities, enabling just he kind of notifications that you are looking for above.

    Thanks,

    Matthew
  • Thanks for the quick answer - have been playing with 7.0 in labs and have indeed seen that feature. If there's no other way to grab the old values, I guess the full email notification will have to wait until we upgrade then.

    So if I would only want to report on the new manager values, what would be the easiest way to go about to have that info displayed in the notification email? Just modify the custom notification in the workflow? Or have a separate script/workflowobject?
  • Michiel,

     

    Actually, come to think on it, you may be able to easily do this with 6.9.

    When you are designing your notification, and click "Insert Token..." use Operation - Target Object - Property To Set to refer to the new value, and Operation - Target Object - Property to refer to the old value.

    See if that works.

     

    Matthew

  • Thanks - I will give that a try! Do you by any chance also know if/how I can have both the old and the new manager receive the notification email? Is there a way to automatically include them in each notification?

    My intention was to create awareness of any manager changes, so that both old and new managers know what was changed etc.
  • Michiel,

    I haven't tested this, but this is what I would do: I would create two different notification steps, one from before the object is modified and one from after, both set to include the objects manager.

    Matthew
  • Thanks Matthew for this suggestion; I've played around with this for a bit but I can't seem to figure out how to address the "old managers" first and then have a 2nd notification for the new managers. In the "Recipients" screen for the notification, I can't see how to distinguish between old vs new "Manager of operation target".
  • Hi Michiel, same case we had and we ran script for this... in workflow you have to save the old manager in va and then you can call the both attribute in script to send a notification. do let me know if you haven't resolve this scenario..