Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Lee 1130 posts 3088 karma points
    Nov 15, 2011 @ 15:29
    Lee
    0

    Catch Change Of Property Value In Event?

    I need a way to catch a change in a property value when the node is changed, say if I have a drop down with a status on it (Pending, Live, Finished) etc..

    And someone changes the dropdown from pending to live, I need to be able to send an email - So I need to know that its actually been changed from one to another. 

    Any ideas?

  • Ismail Mayat 4511 posts 10092 karma points MVP 2x admin c-trib
    Nov 15, 2011 @ 15:33
    Ismail Mayat
    0

    Lee,

    When they change and save you could tap into the save event? If you want email without the save and just on the dropdown change then think you would have to create your own datatype and that would need to send the email on drop down change?

    Regards

    Ismail

  • Tom Fulton 2030 posts 4998 karma points c-trib
    Nov 15, 2011 @ 15:34
    Tom Fulton
    2

    I don't know of a way to catch the raw values, but you could use NodeFactory vs the Document API and compare those.  Have a look at this thread.

    -Tom

  • Lee 1130 posts 3088 karma points
    Nov 15, 2011 @ 16:12
    Lee
    0

    @Ismail - I looked at the save, after and before and apparently you can't get the previous value - Toms solution seems good for now.

    @Ismail - Awesome that'll work just fine thanks Tom :) 

  • Jeroen Breuer 4908 posts 12265 karma points MVP 5x admin c-trib
    Nov 15, 2011 @ 16:20
    Jeroen Breuer
    0

    Remember that Tom his solution only works if the user presses save and publish button. If the user just presses the save button the data in the NodeFactory is not updated and your check will not work.

    Jeroen

  • Lee 1130 posts 3088 karma points
    Nov 15, 2011 @ 16:23
    Lee
    0

    Yep its fine anyway, it won't fire if they just save... But if they just save, then come back an hour later and save and publish it will still work as the cache would still be holding the old value.

  • John Walker 41 posts 136 karma points
    May 30, 2013 @ 11:58
    John Walker
    0

    Great work around Tom just solved my issue. Thanks

Please Sign in or register to post replies

Write your reply to:

Draft