(Solved)Need ideas for my action chain about Barcode Scanner

Hello everyone,

I have an app for student club and in this app you can share your lesson data(its a firebase document) with others using qr code. When first person shares qr and other scans it, app is copying the document for second user. But I have a problem here.

To be able to copy document I created ref number for every document, when scanner reads this number everything is ok. I got what I want.

But, if user cancels scan action in camera mode. Apps crashing because there is no ref number to read. It's not canceling the action chain. I tried to use conditional action but unfortunately it's not working.

Do you have any ideas to make it work?

Update:

Hello again, I solved the problem & will mention about here incase if anyone else need id when I get a chance.

Last Update (13.10.2023):

Solve method:

I mentioned before about that I use qr widget to share document with other users using some ref number for every document. I created conditional action chain to check if document is exist.

Basically,

1- QR widget creates qr using a string from that document.

2- Other users scans this qr and gets the string

3- Action chain; checks if there is any document includes this string(Query collection with filter). If it finds document, continuing copy document. If it can not find any document, then it shows an error with informational dialog or bottom sheet.

Example SS below;

2
2 replies