observefield does not have support for listing multiple callback functions. You would have to observe the field twice but then you are not guaranteed callback order.
I tried it, but In function 1 I’m accessing a url which takes some time to assign it to the variable and meanwhile the function 2 gets called which cause a problem in my particular app.
callback1 = "function1"
callback2 = "function2"
requestNonceButton.observeField("itemSelected", callback1, callback2)
' have to set this field in the XML of the component as an interface
requestNonceButton.observeField("thisField", callback3)
function callback1(callback2 as String)
' do some stuff
' trigger second event when done
requestNonceButton.thisField = callback2
please join and post in the General slack channel…
The community there are super helpful and often you will get a clear and timely reply, I will be there also… sorry I’m a tech lead developer so my time is really constrained … cheers …
PS the solution suggested by the other person would not help - are you passing the callbacks as a parameter? if not you can do
callback = "doSomeStuff"
requestNonceButton.observeField("itemSelected", callback)
function doSomeStuff
' run some code
' when completed
doSomeOtherStuff()