Validate that a document exists in a collection

Hello to all,

Let me see if anyone can help me as I am getting desperate.

Context: I am making an app for a football club. One feature is that fans can add their club membership card to the app in digital format.

For this functionality I have a collection called "members" in which I have one document for each club member. That document has a "qr_code" field as each season ticket has a code like "xGjw21Jsw". The document has other fields (name, row, seat, etc.). All this data is preloaded by the club in the collection.

I use the QR code so that the user can retrieve all the information of his season ticket by entering only this code.

Yesterday something worked for me and today I don't know if I touched something that messed it up. I'm not able to get it to work.

In the root of the screen where I retrieve this information I call the Query "Members" and filter the field "qr_code" to match the widget state variable.

Then in the button I have created a conditional action as follows:

Would anyone know why it is not recognising the codes for me? It always gives me a "false". Even if the code is registered in some document in the collection.

Thank you very much in advance. Let's see if I can get this unstuck.

Best regards!

2
1 reply