Page 1 of 1

Phone cell GSM condition

Posted: 26 Apr 2015 10:28
by banarelo
Hi,

I'm trying to collect unassigned CIDs to a global variable WorkCIDs but encounter a problem with the following flow:

-trigger: Periodic Timer
-condition: Phone Cell GSM: Connected to CIDs {global_WorkCIDs}
-->false: -condition: Expression: containsElement(global_WorkCIDs, cid)
-->false: -action: Script: addElement(global_WorkCIDs, cid)
-->true: -action: Notification on Statusbar: Something is wrooooong


The 1st condition evaluates to false even though the current cell is on the list (the 2nd condition evaluates to true...) - what's going on here or am I doing something wrong?
With Phone Cell GSM condition I'm using Classic method as Modern just returns a null cid. Screen is on all the time. Happens when I use a trigger or just execute the flow manually.

Any help would be appreciated

Re: Phone cell GSM condition

Posted: 26 Apr 2015 14:42
by TheBrain1984
I had the same problem.
The problem in the first condition "Phone Cell GSM" is that it expects a specific kind of list. The list has to be like value1,value2,value3. The list you give to this condition at the moment is like value1, value2, value3 so with whitespaces after the comma and it can be that is interpreted as a string and not a list. What you can do is change the "array-call" in the condtion from

-condition: Phone Cell GSM: Connected to CIDs {global_WorkCIDs}

to

-condition: Phone Cell GSM: Connected to CIDs {global_WorkCIDs, listformat, comma}

this should work

Re: Phone cell GSM condition

Posted: 26 Apr 2015 15:22
by banarelo
Like a charm.

I wonder about the whitespace theory(?) though, it could be just a kind of type casting problem from List type to "comma separated list" format (Martin did write about it here, now that I know what to look for).

Anyway, thanks a lot. 8-)