Page 1 of 1

Checking Variable Not Working

Posted: 12 Dec 2019 13:37
by steelersmb
I am having some trouble with this flow. In the GSM Based Wifi State, I am trying to check a variable to see if I am connected to a list of cell GSM cell towers but it's not working. It's a simple variable that stores a list of cell towers. Can someone please take a look at it and help me to figure out why it's not working? I don't think the Phone Cell GSM is working when you are trying to check it against a variable.

Re: Checking Variable Not Working

Posted: 12 Dec 2019 18:34
by Desmanto
Did the flow get triggered? Check the flow's last execution time. If it is not triggered at all, check all the permission, make sure Automagic has been granted all necessary permission.

{global_cid_list} also need to be populated with the cid list first. How many cid do you have there? (not need to mention the id here, just need the count)

Re: Checking Variable Not Working

Posted: 12 Dec 2019 19:35
by steelersmb
Yes, I do have CID's in the variable but it doesn't work. I think it's a bug because when I add a message box and display the variable before this step it does show the info but it just doesn't check them.

Re: Checking Variable Not Working

Posted: 12 Dec 2019 20:08
by Micky Micky
I think where the trigger says a list it doesn't mean a list held in a variable. It means a list held there or a list of variables held there.

Re: Checking Variable Not Working

Posted: 12 Dec 2019 20:40
by steelersmb
I see what you are saying but that's not very good as you should be able to use a variable in this field.

Re: Checking Variable Not Working

Posted: 13 Dec 2019 18:55
by Desmanto
Oh, I don't use this trigger/condtion, don't know that field doesn't support variable. Naybe this should be requested as feature to allow us to use variable in this field. For mean time, you can copy manually the cid that you have logged and pasted it into the trigger and the condition. Make sure it is comma separated list.

Re: Checking Variable Not Working

Posted: 13 Dec 2019 21:10
by Martin
Hi,

You have to make sure that the variable is formatted correctly to a coma separated list by using {global_cid_list,listformat,comma}

Regards,
Martin

Re: Checking Variable Not Working

Posted: 14 Dec 2019 00:55
by steelersmb
I did that when saving the variable but now all I get is [] in the variable.

Re: Checking Variable Not Working

Posted: 14 Dec 2019 01:06
by steelersmb
WHen you just put addElement(global_cid_list) it puts them in a list format comma separated. I think there is something wrong with the checking of a variable in this block.

Re: Checking Variable Not Working

Posted: 14 Dec 2019 08:26
by Desmanto
@Martin : Oh, that field is comma delimited list. I tried that now, and seems working.

@steelersmb : Go to your global variable and check the content of the global_cid_list. Do you have list of CID? You have to log some to get it filled with cid. The one you see in the comma form is not comma delimited, it is list type. The difference is comma delimited is a string type variable. You can try this in a script.

Code: Select all

cidlist = newList(123, 456, 11122233);
commadel = "{cidlist,listformat,comma}";
Add Condition debug dialog after the script element, execute the flow and change value on {cidlist} and {commadel}. You wil see on {cidlist} you can have index element 0, 1, 2, and you can tap on individual element to change the value. While {commadel} is just a string combined with comma; just a like a single line csv. A lot of Automagic field require multiple element to be shown in comma delimited format, such as input dialog, wifi SSID, file list and many others.