Page 1 of 1
make a new action: delete a variable
Posted: 28 Dec 2015 02:46
by houdinix64
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
Posted: 28 Dec 2015 07:11
by MURTUMA
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.
Re: make a new action: delete a variable
Posted: 15 Jul 2016 08:16
by houdinix64
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?
Re: make a new action: delete a variable
Posted: 15 Jul 2016 08:35
by Bushmills
Yes, you forgot to quote the name, as in
removeVariable("global_dateA");
otherwise you'll (try to) remove a variable with the name expressed by the value of global_dateA.
I dont want to delete the variable.bin
no need to, simply use removeVar() correctly.