How to pass a variable to a flow

Post your questions and help other users.

Moderator: Martin

Post Reply
User avatar
xpdev
Posts: 59
Joined: 16 Sep 2014 06:20
Location: Italy

How to pass a variable to a flow

Post by xpdev » 18 Sep 2014 09:56

Hi guys...

I need to pass a variable to a flow....

now i explain:

I have 15 global variables and i need to set the default value for each one when Automagic service starts.....

so... if there is a particular way/function that i have not found i'll wait for your suggestion...

or i have to do this....

Flow_A (caller for Flow_B)
Flow_B (flow that will set global variable value)

Flow_A call Flow_B passing to it global variable name and his default value to set.
Flow_B it to set the default global variable value.

of course i need to call n times Flow_B from Flow_A

In this way Flow_B may be called from every flow everywhere....

any idea for a better way ?

thanks
Xiaomi MI 6

Rom Miui 10 EU STABLE

User avatar
kintrupf
Posts: 257
Joined: 10 Sep 2013 08:59

Re: How to pass a variable to a flow

Post by kintrupf » 18 Sep 2014 11:58

You don't need to pass global variables from one flow to another. That's why they are called "global", they are available in every flow ;)
And to initialize the variables at Automagic startup create a flow with the aptly named trigger "Automagic Startup".

User avatar
xpdev
Posts: 59
Joined: 16 Sep 2014 06:20
Location: Italy

Re: How to pass a variable to a flow

Post by xpdev » 18 Sep 2014 12:36

kintrupf wrote:You don't need to pass global variables from one flow to another. That's why they are called "global", they are available in every flow ;)
And to initialize the variables at Automagic startup create a flow with the aptly named trigger "Automagic Startup".
Thanks kintrupf

there is another better way or i need to build a flow with n Script for initialize n Global Variable ?
Xiaomi MI 6

Rom Miui 10 EU STABLE

User avatar
kintrupf
Posts: 257
Joined: 10 Sep 2013 08:59

Re: How to pass a variable to a flow

Post by kintrupf » 18 Sep 2014 14:36

You don't need a flow, you can edit them in Automagics main menu if you only need to initialize them once. Go to “Manage“ and then “Global variables“.

User avatar
xpdev
Posts: 59
Joined: 16 Sep 2014 06:20
Location: Italy

Re: How to pass a variable to a flow

Post by xpdev » 18 Sep 2014 14:41

ok thanks.
Xiaomi MI 6

Rom Miui 10 EU STABLE

Post Reply