Solved
Forum Discussion
3 Replies
Sort By
- Ryan_MoranValued Contributor
- chitra_cNew ContributorHi,
Thanks for the reply. We followed the same with the link you have given. But it is not working.
without running the whole Add_Department function, how can we call the variable and the stored value directly to Edit_Department. script Unit.
Regards
Chitra.C - Ryan_MoranValued ContributorYou must declare the variable outside the function for it to be a "global" variable, and also have the USEUNIT <scriptnamewithglobalvariable> added to scripts that need to acccess the global variable. Additionally you can use project variables.
JScript Example:
UNIT1:
//USEUNIT UNIT2
function main(){
wshell.popup(myGlobalVariable);
myGlobalVariable = 'test2';
secondary();
wshell.popup(myGlobalVariable);
}
UNIT2:
wshell = new ActiveXObject('WScript.Shell');
myGlobalVariable = 'test1';
function secondary(){
wshell.popup(myGlobalVariable);
myGlobalVariable = 'test3';
}
Related Content
- 2 years agoTestQA1
- 5 years agoKrishna_Kumar
- 4 years agonedbacan
Recent Discussions
- 16 hours agovladd1