Checking Variable Not Working

Post your questions and help other users.

Moderator: Martin

Post Reply
steelersmb
Posts: 30
Joined: 21 Oct 2013 21:27

Checking Variable Not Working

Post by steelersmb » 12 Dec 2019 13:37

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.
Attachments
exported_data_20170719_100315.xml
(6.07 KiB) Downloaded 734 times

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

Re: Checking Variable Not Working

Post by Desmanto » 12 Dec 2019 18:34

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)
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.

steelersmb
Posts: 30
Joined: 21 Oct 2013 21:27

Re: Checking Variable Not Working

Post by steelersmb » 12 Dec 2019 19:35

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.

Micky Micky
Posts: 179
Joined: 16 Oct 2019 17:38

Re: Checking Variable Not Working

Post by Micky Micky » 12 Dec 2019 20:08

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.
Crude but it works.

steelersmb
Posts: 30
Joined: 21 Oct 2013 21:27

Re: Checking Variable Not Working

Post by steelersmb » 12 Dec 2019 20:40

I see what you are saying but that's not very good as you should be able to use a variable in this field.

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

Re: Checking Variable Not Working

Post by Desmanto » 13 Dec 2019 18:55

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.
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.

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

Re: Checking Variable Not Working

Post by Martin » 13 Dec 2019 21:10

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

steelersmb
Posts: 30
Joined: 21 Oct 2013 21:27

Re: Checking Variable Not Working

Post by steelersmb » 14 Dec 2019 00:55

I did that when saving the variable but now all I get is [] in the variable.

steelersmb
Posts: 30
Joined: 21 Oct 2013 21:27

Re: Checking Variable Not Working

Post by steelersmb » 14 Dec 2019 01:06

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.

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

Re: Checking Variable Not Working

Post by Desmanto » 14 Dec 2019 08:26

@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.
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.

Post Reply