Perform Task - Local Variable Passtrough not working in Scene's Action

74 views
Skip to first unread message

francwalter

unread,
Feb 9, 2023, 5:53:28 AM2/9/23
to Tasker
Hallo
I have a Task "MainTask" with a variable %test = 0 (Do Maths: checked) from which I call a Scene:

Display As: Activity

In this Scene I have an Action:

Scene > Properties > Actions > Action: Perform Task: ChildTask
Local Variable Passthrough: checked
Allow Overwrite Variables: checked

ChildTask: 
Variable Set > %test = 1

But when I run this Action (to set %test to 1) and the ChildTask is finished, %test is again 0.
It is not possible to overwrite %test when started the ChildTask from this Action.
If I would start the ChildTask from the Scene (e.g. with a Button) it would work, but not with an Action in the Properties Dialog of the Scene.

I guess the Local Variable Passthrough is interrupted between this Scene's Action and
the Perform Task somehow.

Is this by intention or is it a bug?

Thank. frank

Tasker 6.1.9-beta on Android 9 (Xiaomi Mi A1)

Rich D

unread,
Feb 9, 2023, 12:50:24 PM2/9/23
to Tasker Google Groups Post
You need to use a return action from the child. Be sure to read all of the help texts for both actions in regards to the variable passthrough 

francwalter

unread,
Feb 12, 2023, 8:58:41 AM2/12/23
to Tasker
I tried all, I think. Return action and all this stuff and checkboxes. Nothing helped.
It seems that I cannot change the variable of the main Task, which opens the Scene, which opens via an Action another Task. That last child task cannot change variables of the very first task.

francwalter

unread,
Feb 16, 2023, 7:09:39 AM2/16/23
to Tasker

Rich D schrieb am Donnerstag, 9. Februar 2023 um 18:50:24 UTC+1:
You need to use a return action from the child. Be sure to read all of the help texts for both actions in regards to the variable passthrough 

No, I think it is definitely a bug.

I exported the descriptions to Clipboard, look yourself (and try it):

1. the main Task:

Task: zTestAction
   
    A1: Variable Set [
         Name: %test
         To: 0
         Do Maths: On
         Max Rounding Digits: 0 ]
   
    A2: Show Scene [
         Name: TestAction
         Display As: Activity
         Horizontal Position: 100
         Vertical Position: 100
         Animation: System
         Continue Task Immediately: On
         Allow Outside Boundaries: On
         Blocking Overlay +: On
         Overlay +: On ]


2. the Child Task:

Task: zTestActionVarTest
   
    A1: Variable Set [
         Name: %test
         To: 3
         Do Maths: On
         Max Rounding Digits: 0 ]
   
    A2: Return [
         Value: %test
         Stop: On
         Local Variable Passthrough: On
         Replace On Passthrough: On ]

And the Scene, I would like to export too, but the export is another buggy thing, lacking the most important parts, the Events, they are only a number, no information what they does.
And the two Actions are just not described at all.
 I explain all those after the Scene's description.


2. The Scene:

Scene: TestAction
 P:702x1248 L:-1x-1

  Orientation: System
  Background Colour: #FF000000
  Action Bar Style: System
  Title: TestAction
  Subtitle:
  Icon: null
  Tab Labels:
 Events:
  Key: 998

Element: Button1/Button
 Geometry:
  P:227,673 234x248 L:-1,-1 -1x-1
 Content:
  Label: Test = 1
  Label Size: 16
  Label Width Scale %: 100
  Label Colour: #FFFFFFFF
  Font:
  Position: Centre
  Icon: null
 Events:
  Click: 991

Element: Button2/Button
 Geometry:
  P:227,401 234x271 L:-1,-1 -1x-1
 Content:
  Label: Alert Testvar
  Label Size: 16
  Label Width Scale %: 100
  Label Colour: #FFFFFFFF
  Font:
  Position: Centre
  Icon: null
 Events:
  Click: 992


So here what the Events do:
Key 998 is Destroy Scene on back
Click 991 is Alert %test
Click 992 is %test=1
Action 1 does Variable Set %test=2
Action 2 does Perform Task zTestActionVarTest
    Priority = %priority + 1
    Return Value Variable = %test
    Local Variable Passthrough = On
    Reset Return Variable = Off (if I check this, I get an empty var %test in my Button1-Alert)
    Allow Overwrite Variables = On
(the other fields are unset or unchecked)

To conclude: the bug is, that

When I hit the ? near "Allow Overwrite Variables" (in the Perform Task Action) I can read:

"If enabled the child task is free to overwrite any variables that already exist in this parent task.
Please note that you need to enable the option to replace in the 'Return' action as well"

And this is checked (see above the Task 2 description "Replace On Passthrough: On").

So I hope that this issue could be fixed :) :)
I dont want to use global variables for it, though it would work.

Thank.frank

By the way, the App Factory on DropBox is still 6.0.9-beta and Tasker direkt is already 6.10-rc. Possible to update App Factory to the same version? Thank!
 

francwalter

unread,
Feb 16, 2023, 7:24:10 AM2/16/23
to Tasker
Sorry, forgot to complete that sentence:
 
To conclude: the bug is, that

... the "Replace On Passthrough" between a Child Task (when started with "Perform Task" from an Action in a Scene's Property) and the Scene (which has all the variables of the main Task which opened the Scene) is not working.
I guess the "Perform Task" in the Scene's Properties Actions is disrupted with the Scene. Different namespace or such thing.

francwalter

unread,
Feb 20, 2023, 5:10:14 AM2/20/23
to Tasker
OK, I give up, I guess this i a minor bug and will never be fixed, since it is also possible to use global Variables.
Thats what I did now, I use as "workaround" global Variables.
Never mind, it works like that.
Thank.frank

Brenden M

unread,
Feb 21, 2023, 11:58:11 AM2/21/23
to Tasker
Does the section in Userguide on "Scene-Local Variables" explain this? "When a task shows a scene that was created...and subsequently hidden...variables are copied...but the task does not share the scene variables and cannot see changes to them" is what Userguide says. It seems close to what might be happening for you.

Rich D

unread,
Feb 21, 2023, 12:40:10 PM2/21/23
to Tasker Google Groups Post

OK, I give up, I guess this i a minor bug and will never be fixed, 

Seems like a legitimate bug to me. It might not be possible or it could have just been an oversight when João first implemented the pass through options (I think very few users utilize those action buttons).  I would use the option in the tasker menu to report issues to developer. That has always worked well for me.. 

francwalter

unread,
May 29, 2023, 8:14:38 AM5/29/23
to Tasker
Rich D schrieb am Dienstag, 21. Februar 2023 um 18:40:10 UTC+1:
Seems like a legitimate bug to me.

OK, I sent it just now to Joao as Bug report from Taskers menu. Thanks...

My solution with global Variable works, but it is not very good style and I try to reduce global Vars.
I use these Actions in the Scene''s Properties Menu in a bigger project (with at the moment 11 Task)
The Scene is an Activity and it feels like a real app, with these menu entries :)
I would miss them if gone.
But as a part of the Scene, it should share all features and properties, I think.
So yes, I think it is a bug.
frank


Reply all
Reply to author
Forward
0 new messages