Hello,
We are struggling a bit with getting information about model attribute changes when running a macro.
Scenario: When a user changes a specific model attribute to a specific value, we want to trigger certain actions in the database.
We have created a macro which is triggered by "Model attribute changed" event, but it seems we can not detect through the macro API which of the model's attribute(s) have changed. We would expect the list of changed attributes in the event argument list, but the arguments list is empty.
If we use instead the "Model attribute is to be changed by modeling (vetoable)" event, the attribute type number is included in the arguments list - however this event is triggered before any changes are made to the attribute.
Does anyone know how to support the scenario at hand?
Thanks in advance.
Hi,
The only work around available is to create a second attribute (not maintainable) containing the same value as the actual attribute you want to check. When the macro is triggered, you can compare the values, and determine whether the attribute has changed. After performing the necessary actions, you can update the additional attribute to the value of the additional attribute.
Best regards,
Edwin