Checking Variable Not Working
Moderator: Martin
-
- Posts: 30
- Joined: 21 Oct 2013 21:27
Checking Variable Not Working
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
Re: Checking Variable Not Working
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)
{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.
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
-
- Posts: 30
- Joined: 21 Oct 2013 21:27
Re: Checking Variable Not Working
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.
-
- Posts: 179
- Joined: 16 Oct 2019 17:38
Re: Checking Variable Not Working
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.
-
- Posts: 30
- Joined: 21 Oct 2013 21:27
Re: Checking Variable Not Working
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
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.
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
Re: Checking Variable Not Working
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
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
-
- Posts: 30
- Joined: 21 Oct 2013 21:27
Re: Checking Variable Not Working
I did that when saving the variable but now all I get is [] in the variable.
-
- Posts: 30
- Joined: 21 Oct 2013 21:27
Re: Checking Variable Not Working
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
@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.
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.
@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}";
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.
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.