Way to actually Delete/Remove Variables - not just Clear their values - from the Variable list?

369 views
Skip to first unread message

Nick_

unread,
Apr 29, 2012, 12:43:38 AM4/29/12
to Tasker
This is driving me crazy and I've search a lot.

Currently, when you do a Variable Clear Action - it just clears the
value of the variable, but the variable name remains in memory and in
the list of variables if you go to the Variables Tab. I want to be
able to clean it up and actually remove from memory the entire
variable- its name and value. I want it gone from that list. Is
there a way I can do this or am I doing something wrong?


Example
Lets say Var1 contains the string "word1 + word2"

Code : Variable Split %Var1 Splitter +

Gives you %Var11=word1 and %Var12=word2

Code: Variable Clear Var11
Code: Variable Clear Var12

If you go to the Variables Tab there is Var11 and Var12 are still
there but with empty values.

How can I delete, not clear, them.

Pent

unread,
Apr 29, 2012, 3:30:45 AM4/29/12
to Tasker

> This is driving me crazy and I've search a lot.

Did you look in the userguide ? (Menu / Info / Help This Screen)

> Currently, when you do a Variable Clear Action - it just clears the
> value of the variable, but the variable name remains in memory

Only if it's been mentioned somewhere in your configuration data.

> and in
> the list of variables if you go to the Variables Tab.  I want to be
> able to clean it up and actually remove from memory the entire
> variable- its name and value.

That's what happens.

>  I want it gone from that list.  Is
> there a way I can do this

Deselect the 'Referenced' button.

Pent

Nick_

unread,
Apr 29, 2012, 5:42:47 AM4/29/12
to Tasker
> Did you look in the userguide ? (Menu / Info / Help This Screen)

Yes. The distinction between Clear and Delete is unknown to me.

> Only if it's been mentioned somewhere in your configuration data.

What is "configuration data" with regards to Tasker? Are you
referring to the Preferences menu? If so, I see nothing that would
cause variables to persist after having been cleared.

> Deselect the 'Referenced' button.

Where is this button?

Thank you,
Nick

TW

unread,
Apr 29, 2012, 7:35:46 AM4/29/12
to tas...@googlegroups.com
configuration data in Tasker is any Task or Profile..
so if you have a Task that has any reference with a certain Variable, this Variable will remain in the list..

Nick_

unread,
Apr 29, 2012, 3:22:07 PM4/29/12
to Tasker
Define "reference" please.

TomL

unread,
Apr 29, 2012, 4:17:06 PM4/29/12
to tas...@googlegroups.com
it means somewhere in one of your actions, you refer to that variable. something like:

set variable %YOURVAR = %YOURVAR + 1

or as part of an if clause in an action:

alert > flash "it happened", if %YOURVAR = 2

Tom

Nick_

unread,
Apr 30, 2012, 3:38:38 AM4/30/12
to Tasker
Wait so if I am understanding this right "referencing" means using a
variable...well why else would I create a variable if I was not going
to use it. The problem is that once I am done with it (as a result of
a bunch of Variable Splits) I want to Clear the variable and get rid
of it completely. I am confused, what I am getting from this
discussion is that I am unable to actually delete variables that I
have used in my task, just clear their values.

Matthieu Berthomé

unread,
Apr 30, 2012, 4:05:00 AM4/30/12
to tas...@googlegroups.com
If the variable is cleared it's not taking any space at all except in the variable picker or variable editor.
Well, maybe Pent could make it so that in in these screens the variable that are cleared/empty are not shown, but that could be an annoyance if you want to modify or put a value in a variable that is cleared without creating a task just for that.
An action could be created that explicitely deletes a variable (and then not showing it in variable picker/editor), or make it an option of the variable clear to also clear the variable name, but it might be not that easy to do.
Note that in the userguide, it's "currently, the name is not cleared", so it might be planned.

TomL

unread,
Apr 30, 2012, 8:14:19 AM4/30/12
to tas...@googlegroups.com
Does the variable in question need to be a global variable ("%YOURVAR")?  If you change it in your actions to be a local var ("%yourvar") ?  This way, it won't show up at all in the Variables tab.

Tom

Nick_

unread,
Apr 30, 2012, 4:55:20 PM4/30/12
to Tasker
"Note that in the userguide, it's "currently, the name is not
cleared", so
it might be planned. "

Thank you, I did not know that.

On Apr 30, 4:05 am, Matthieu Berthomé <matthieu.berth...@gmail.com>
wrote:

Nick_

unread,
Apr 30, 2012, 4:55:49 PM4/30/12
to Tasker
I will investigate. Thank you very much for this insight.
Reply all
Reply to author
Forward
0 new messages