FindAll(?) How use?

General discussions about Automagic and automation in general

Moderator: Martin

Post Reply
boruciak
Posts: 23
Joined: 31 Aug 2018 09:06

FindAll(?) How use?

Post by boruciak » 23 Sep 2018 15:07

Hey,
I have a txt file with NFC TAG data:
837463
736490
435565
....
I want to make sure that the ID is in the file after the NFC card is closed.
Result: true or false
He combines but I do not know how to do it.

Uses Init Variable Text File and ????

Please help.
thank you

boruciak
Posts: 23
Joined: 31 Aug 2018 09:06

Re: FindAll(?) How use?

Post by boruciak » 23 Sep 2018 15:42

Ok.

Expression:

indexOf(id, {s})=>0

id - text.file
s - NFC TAG

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

Re: FindAll(?) How use?

Post by Desmanto » 23 Sep 2018 16:30

if you want to check some string inside another text, just use contains(). In your case, init text file first to {id}. Then your nfc is stored at {s}. Then use expression

Code: Select all

contains(id, s);
This will return true if the nfc contains the string in the text.
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.

boruciak
Posts: 23
Joined: 31 Aug 2018 09:06

Re: FindAll(?) How use?

Post by boruciak » 23 Sep 2018 18:42

Revelation.
Simple and easy to remember :)
Thanks Desmanto!

Post Reply