Question
Morgan Stanley
IN
Last activity: 14 Aug 2019 9:48 EDT
Take backup of property values (need old and new values)
Hi
How do i retrieve the last value of my property.
I mean if i have a property let's say Cost which initially does not have any value.
Now, i set the value of Cost to to 100
Now, i change the value of Cost to 125. Now, i would like to retrieve old value 100
Any thoughts?
I have tried declare trigger but it does not seem to save the value to clipboard:
https://community.pega.com/support/support-articles/pystatusworkold-reflects-current-status
If i update the Cost property by using declare trigger i'm able to save the previous property value to CostOld. However, the old value is present only in the context of the declare trigger. Once, the trigger is executed the CostOld property is also being replaced with the current value.
So, if i have to retain CostOld i have to create a third property may be CostOldValue and then in the declare trigger activity i have to copy the CostOld to CostOldValue.
Any better approach?