-
Hi! Once again trying to figure something out, I've gotten the runOnAttributeChange event firing, however I was expecting one of the above api values to show me the note that had the attribute changed in it. However when the event fires and I log currentNote and startNote to the backend, the both are just the script that is currently running "onDinnerChanged". For context I am wanting to retrieve the note that had the attribute changed so I can copy the value and put it in a JSON file, I already am able to update the JSON data note without issue, but haven't managed to get the correct note to pull data from. Thanks again for the help. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
For this purpose there's const note = api.originEntity.getNote(); |
Beta Was this translation helpful? Give feedback.
For this purpose there's
originEntity
which contains the entity which sort of triggered the event. In the case of runOnAttributeChange the originEntity is the attribute on which the change is being done. If you want to access the note owning this attribute then do just: