make a new action: delete a variable
Moderator: Martin
-
- Posts: 33
- Joined: 08 Mar 2013 12:45
make a new action: delete a variable
im newbie in programming. Instead of using removemapentry function, i think its easy if theres an action "remove variable".. I want to remove all contents in variable map with no user interaction.. im sorry i cannot explain it well and for my bad english
Re: make a new action: delete a variable
Do you mean local or global variable?
Local variables are not stored permanently. They are lost when flows using them stops executing.
For global vars, there are a script function for deleting them: removeVariable(name). Other way is deleting variables.bin file from automagic folder, if you want to delete them altogerther without precise control.
Local variables are not stored permanently. They are lost when flows using them stops executing.
For global vars, there are a script function for deleting them: removeVariable(name). Other way is deleting variables.bin file from automagic folder, if you want to delete them altogerther without precise control.
-
- Posts: 33
- Joined: 08 Mar 2013 12:45
Re: make a new action: delete a variable
using action script "removeVariable(name)" doesnt work for me..I been executed the action with no errors but still the global variable exist in "global variable list"..I dont want to delete the variable.bin inside automagic folder.
example I created a action script:
removeVariable(global_dateA);
removeVariable(global_dateB);
removeVariable(global_dateC)
is there anything that i missed?
example I created a action script:
removeVariable(global_dateA);
removeVariable(global_dateB);
removeVariable(global_dateC)
is there anything that i missed?
Re: make a new action: delete a variable
Yes, you forgot to quote the name, as in
otherwise you'll (try to) remove a variable with the name expressed by the value of global_dateA.removeVariable("global_dateA");
no need to, simply use removeVar() correctly.I dont want to delete the variable.bin