Page 1 of 1

Deleting Global Variables

Posted: 26 Nov 2013 00:28
by 98b427af
How do I delete a global variable from within a flow or script? Assigning 'null' like this doesn't do it:

Code: Select all

global_aVar = null;
The variable still appears in the list of global variables, with a value of 'null'.

Thanks.

Re: Deleting Global Variables

Posted: 02 Dec 2013 17:33
by Martin
Hi,

There is currently no way to delete a variable in script. You have to use menu->Manage->Global Variables to completely delete a global variable.
I have added it to my todo-list to add a way to do this from a script.

Regards,
Martin

Re: Deleting Global Variables

Posted: 09 Jan 2014 14:14
by kintrupf
Please bump up the priority of this a bit.
Having a "removeVariable" function which is not able to remove global variables is a bit pointless, since local variables are automatically deleted when a flow ends... ;)

Re: Deleting Global Variables

Posted: 09 Jan 2014 19:54
by 98b427af
It does remove globals, at least as of v1.20.0. Remember to pass the variable name as a string:

removeVariable("global_x")

Re: Deleting Global Variables

Posted: 09 Jan 2014 20:08
by kintrupf
98b427af wrote:It does remove globals, at least as of v1.20.0. Remember to pass the variable name as a string:

removeVariable("global_x")
Ups, that I didn't try :roll:
Works, thank you!