removeDuplicateElements

Post your questions and help other users.

Moderator: Martin

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

Re: removeDuplicateElements

Post by Desmanto » 08 Sep 2017 17:41

simon_magus101 wrote:I was using Llama. All GUI no scripting. Now I am attempting to migrate all my automation from Llama to Automagic. I figured out the Debug Dialog and found out what the problem is after viewing the data in JSON format. I was comparing strings to numbers. There are two more flows that I use: one to backup the numbers in text file and, one more to restore the numbers from the text file. When I restore it became text instead of numbers. Please check out these two flows and see if there is a fix. I need to get back the numbers in number format from a text file.
http://automagic4android.com/flow.php?i ... 03c804ecde
I am from tasker, also GUI no scripting. After some time, you will find scripting is much more flexible.

When I show it in JSON, I also see double quote surrounding the number. But when I edit it, it shows up as type number. Try to check if the value is exactly the same number, returns true. Don't know why yours shows up as text. But no problem, as long as it is solved already.
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
Bluscre
Posts: 145
Joined: 31 Aug 2017 13:58
Location: Germany
Contact:

Re: removeDuplicateElements

Post by Bluscre » 08 Sep 2017 18:35

Converter functions are awesome!
toString(), toNumber() etc
Unofficial AutoMagic Telegram Group: https://t.me/automagicforandroid
Check out my other flows here: https://github.com/Bluscream/AutoMagicFlows or here.

simon_magus101
Posts: 38
Joined: 06 Sep 2017 06:59

Re: removeDuplicateElements

Post by simon_magus101 » 09 Sep 2017 05:23

Desmanto wrote:I am from tasker, also GUI no scripting. After some time, you will find scripting is much more flexible.

When I show it in JSON, I also see double quote surrounding the number. But when I edit it, it shows up as type number. Try to check if the value is exactly the same number, returns true. Don't know why yours shows up as text. But no problem, as long as it is solved already.
Yes I can see the double quote in JSON format. That means those are strings, not numbers. If you view manage global variables, then select change value, then they are displayed as type numbers. I think this is a bug in GUI. When I used removeDuplicateElements, it was actually comparing strings against numbers.
Again guys this Forum support is great. I just finished my Llama automation migration to Automagic. 30 flows.

Post Reply