Passing Local Variable To Notification Action?

35 views
Skip to first unread message

whitedavidp

unread,
Jul 30, 2021, 2:18:46 PM7/30/21
to Tasker

Amazingly, I am using a Notification Action for the 1st time.

I want to pass a local variable's value from the code that puts up the notification so that it can get into a Perform Task called when the action is triggered by the user.

Is my only option to use a global variable?

Thanks

Rich D

unread,
Jul 30, 2021, 3:41:28 PM7/30/21
to Tasker Google Groups Post
The %par1 and %par2 In the preform task action seem to pass without issue.. 

whitedavidp

unread,
Jul 31, 2021, 12:51:26 PM7/31/21
to Tasker
Thanks. But when I try to set up the perform task step and fill in variables from the list of variables, none of my task's defined local variables exist in the list. Not sure if this is by design.

Meanwhile, I have put the data I want to pass into the notification title/text. I then perform a task from the notification action that uses the Notification Listener addon to query notifications shown by Tasker and search them for the data I seek inside the title/text. This works. But seems an ugly hack.

And I have determined that a global variable usage would end up being an ugly thing as well because there might be more than one such notification in my scheme of things.

Rich D

unread,
Jul 31, 2021, 2:04:23 PM7/31/21
to Tasker Google Groups Post

Thanks. But when I try to set up the perform task step and fill in variables from the list of variables, none of my task's defined local variables exist in the list.

Yes, I saw that as well. I randomly see this issue with certain actions. Simply type or copy and paste your variable in the %par1  option. 

whitedavidp

unread,
Jul 31, 2021, 2:44:04 PM7/31/21
to Tasker
By Jove, Rick! That does work as you state. I had presumed that as Tasker does not list the variable name it was somehow out of scope or otherwise not possible. But it merely seems like a Tasker bug. Now will remove all that ugly hack I put in there.

Thanks!
Reply all
Reply to author
Forward
0 new messages