How to access pageVars, appVars inside a Custom Javascript
Open the custom javascript node. On the left side of the page the inputs are listed. An “input1” will appear by default. You can either change that one or add another. If you add another, type in a name and hit return. Then select the “ABC” icon and you will be presented with a dialog that allows you to select app variables, page variables, page parameters, etc. Choose what you want. It will now be accessible in the javascript using the name that you chose.
Note that you cannot change the value of the app (or page or parameter) variables that you input. They are constants. But you can create a new variable within your javascript containing a new value and then export it from the javascript.
Hope this helps.