Array contains string

Actions & Logic

Hello everyone, here's the situation: In my app, I generate a varying number of random strings for creating QR code tickets. These strings are stored in the collection "ticket" under an array called "qrCodes." Now, I use the QR code scanner integrated into FlutterFlow to scan the ticket. This works perfectly. The output of the scan is the random string. πŸ™‚

Now to the problem: I want all collections "ticket" to be searched that contains the scanned random string. If the code is found, the reference of the collection where the code was found should be returned.

In the best case this is a cheap write/read solution cause I think my users will scan thousand of codes a month.

Have you guys any idea? Thanks in advance!

What have you tried so far?

I have already tried using the filter "array contains" => scannedCodes in the query of the collection "ticket", but it always returns only the first collection, even though I am scanning random strings from a completely different collection.

Did you check FlutterFlow's Documentation for this topic?
Yes
2
2 replies