Referring to a function argument in JS


Amin Mousavi
Hi David, I know that when a variable like "test" is defined in the AB we can refer to it in JS as "window.App.RootScope.test" . But when we have a function and function has an argument named as "arg1" if within the function we use JS, "window.App.RootScope.arg1" does not get the argument. I was wondering how can we pull the arguments in JS? thanks

DecSoft

Hello Amin,

Inside an AB user's function, in order to access a function's argument from Javascript, we can use the name of the argument "as is", for example, in your case we can directly use "arg1" without the quotes nor any prefix.



Amin Mousavi
Hi David, it is working now, very helpful as always. THANK YOU

DecSoft

You're welcome Amin! :-)


Everybody can read the DecSoft support forum for learning purposes, however only DecSoft customers can post new threads. Purchase one or more licenses of some DecSoft products in order to give this and other benefits.

This website uses some useful cookies to store your preferences.

I agree. Hide this note. Give me more information.