Global variable is not updated

Post your questions and help other users.

Moderator: Martin

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

Global variable is not updated

Post by kintrupf » 17 Sep 2013 13:40

I have a problem with a global variable. Instead of storing the value of the current cell ID it stores null.
The attached flow is executed every 5 minutes from another flow with a timer.
Update Location.xml
(1.72 KiB) Downloaded 758 times
With on-screen notifications I have verified that the "cid" variable from the phone GSM trigger has valid cell IDs.
But the assignment to "global_CellID" simply does not work, instead of the cell ID null is stored.
If I use an on-screen notification to display the contents of global_CellID after the assignment null is displayed.
In the global variable list the value is also shown as null.

What is wrong?

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: Global variable is not updated

Post by Martin » 17 Sep 2013 19:44

Manually executing a flow or executing a flow using Execute Flows bypasses the regular trigger of the flow so the variables normally set by the trigger are not available in the flow. The variable cid will contain null in this case.

You can use a flow like this to store the cell ID every 5 minutes in a global variable:
Cell Update Flow:
-trigger Periodic Timer: 5m
-condition Phone Cell GSM: Connected to CIDs *
-->true: -action Script: global_cid=cid

Post Reply