cancel
Showing results for 
Search instead for 
Did you mean: 

Previous value of attribute

tdhirendra3221
Explorer
0 Kudos
740

Hi Everyone ,

I have business use case where. I want to execute a logic on drop-down attribute change .

My logic needs to know old value when user changes to new ..

Issue I'm facing , when I changed the attribute it always give newValue .

I'm running the logic on. Attribute change trigger

Thanks

Dhirendra

Accepted Solutions (0)

Answers (3)

Answers (3)

paultrozan
Explorer
0 Kudos

This is not available on a Change Trigger for a normal attribute, but it is available inside containers using EventArgs.ChangedCell.OldValue

I see you already found a solution with global variable, but you could likely come up with a workaround involving containers. Either allow the user to control the attribute directly in the container, or copy the value into the container in order to trigger your logic (something that would be required in Quote 2.0 since it doesn't support global variables).

Fancy_Zou
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

If I understand correctly, you are trying to implement product rules using IronPython scripts attached to Attribute Change Trigger. Please try using a hidden dummy attribute to save the selected value of the attribute which the rules will apply to. Every time when the user changes the attribute value, the script can first get the previous selected value from the dummy attribute, execute the rule logic, and update the dummy attribute value with the latest selected value.

Best Regards

Fancy

tdhirendra3221
Explorer
0 Kudos

Hi fancy.zou ,

That's what i did , eventually using some global variable instead of creating new dummy attribute .

Ideally i was expecting some Out of box event object with Previous and NewValue of attribute

Thanks for Info

Fancy_Zou
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi tdhirendra3221,

May you please login All Improvement Request Lists - Customer Influence (sap.com) using your SUser to submit your idea a feature request? I agree with you that is a very valid feature request and hope the product team can see it.

Best Regards

Fancy

abirami_kar
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Dhirendra,

You can check the previous value of attribute in the audit trail. For more reference, please check the following link.

https://help.sap.com/docs/SAP_CPQ/884885f05e6b4c8082254d4d9d63f19b/658c657655b04582815598c71a06009a....

Thank you!

tdhirendra3221
Explorer
0 Kudos

Hi abirami_karthikeyan

I was talking about change in attribute trigger using iPython script