Export flow with variable as target

General discussions about Automagic and automation in general

Moderator: Martin

User avatar
Desmanto
Posts: 2709
Joined: 21 Jul 2017 17:50

Re: Export flow with variable as target

Post by Desmanto » 25 Jan 2019 18:04

AFAIK, there is no full variable listing with its element which provide it. Only the 3 dot menu > Select variable will give the list. But that is also not useful, since the variable is only available when there are elements providing it. Example, you won't need any bluetooth related variable if you don't use the elements inside the flow. So accessing any of those variables is not useful.

If you need to log various variables provided by any elements, you can use my variable logger flow : viewtopic.php?f=3&t=7285


You can't use list directly inside the field which expect comma delimited list. Using
{global_home_wifi} // gives you : [ap1, ap2]
vs
"{global_home_wifi,listformat,comma}" // gives you : ap1,ap2
is different. Notice that without the listformat,comma, there are brackets, denoting it is a list object, not comma delimited list. You can try it by tap change value, the one with bracket allows you to dig down to each element ap1 and ap2. While the correct version directly show it is a string.

That's why it won't work. You must always use listformat,comma when you want to use a list variable inside the field which expect comma delimited list. At mine it also work only if I use the listformat,comma


Fo flows running, do you put notification everytime you execute the flow? I don't see any notif since I use it from LP 5.1. to Pie 9.0. Only Automagic services need to be persistent, the flows already can run without any additional persistent notification. And since most of the flows are very quick and finish in seconds, so the notif is not really needed.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.

yxd0018
Posts: 85
Joined: 05 Dec 2018 15:14

Re: Export flow with variable as target

Post by yxd0018 » 25 Jan 2019 20:12

Still not working. The {ssid} shows null even I'm connected.

User avatar
Desmanto
Posts: 2709
Joined: 21 Jul 2017 17:50

Re: Export flow with variable as target

Post by Desmanto » 26 Jan 2019 03:39

I am sorry, my bad. I reread my old post and that is when I was not using list yet. The double quote is to protect the ssid with comma inside the name. We can't put the the double quote for the comma delimited list, because when it is formatted as comma delimited, any text contain comma is already protected by double quote by default. So doing it again, will make the list get double quoted again, become string.

So now, please try
{global_home_wifi,listformat,comma}

If it still doesn't work, try to add debug dialog at the false branch and check the value of the global_home_wifi.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.

yxd0018
Posts: 85
Joined: 05 Dec 2018 15:14

Re: Export flow with variable as target

Post by yxd0018 » 26 Jan 2019 19:02

Finally works. Thank you so much.

Post Reply