You can set variable event triggers on Settings - Document Properties - Triggers.
You can set them to trigger actions when a variable value is input or changed (e.g. input by user in an input box or modified, because the expression set in the variable evaluates to a different result because of some selections).
If i create a variable in script and and then if the variable is change then i will have trigger on On change event as Open new qlikivew document, and i created same variable in other document. So is it the case that the value of the variable will be passed to second document?