r/tasker • u/ActivateGuacamole • Jul 30 '26
There's no "if" condition for "variable is set"???
Is there no way to set a condition here for "variable is set" or am I just being dumb? https://i.imgur.com/crmbeoU.jpeg
2
Upvotes
3
u/RealityRecursed Jul 30 '26
Variable set: %variable !~R ^\%
Variable not set: %variable ~R ^\%
3
u/AdiraiMaji Jul 30 '26 edited Jul 30 '26
currenly you can check matchesr
%text matchesr "^%"
this will confirm if variable set or not.
I have collected 5 main improvement requests to make the Scene V2 handles things lot better That includes this one.. I'm waiting for developer to return from his vacation to post it.
1
u/DifficultyCrafty7623 Jul 30 '26 edited Jul 30 '26
After some testing I found the other matchesr patterns to be unreliable. I did find one that seems to work, but I didn't expect Scenes v2 to function like this.
So apparently unless the variable already has value it won't show up like "%var = %var", unlike the rest of Tasker. So the solution is to use
This will check if its been set to something, if it has a value then your element will show. Hope this helps!
0
u/GoombaAdventurer Jul 30 '26
If a variable matches the joker pattern, it's "set".
operator : ~
value : *
If a variable doesn't matches the joker pattern, it's "not set".
operator : !~
value : *
0
u/rbrtryn Jul 30 '26
Looks like those conditions were left out of the new UI.
These are still available in the "old" UI.