How to read only certain QR codes?

Hello, currently the app that I make reads specific qr codes, if the qr code is correct it stores the information in the fields, if it is not correct it automatically throws a message that says "Select list item: Attempt to get item number 2 of a list of length 1: (qr url)

I would like your support to be able to replace that message with a personalized one "example: We only read SONOCO’s QR, make sure it is correct"
I share my blocks, I hope you can help me. Thanks

Do the qr codes have a specific form ?

did you mean that qr codes created by your app must only be scanned by your app. Right?
i made such an app

It’s not a message it’s a error.
you have to put if then condition in scanresult variable
if lengthoflist get ScanResult = 2
then

Else Show alert We only read SONOCO’s QR

1 Like

The structure of the qr code is as follows:

Verificación de Comprobantes Fiscales Digitales por Internet21FA62EA-8DBC-4231-B054-818D84235C63&re=SOP0410217V5&rr=KCM810226DEA&tt=85255.36&fe=y75qSQ==

From the result I decompose and extract 3 fields Invoice number, RFC issuer, Receiver"**

my application only reads qr codes from one company, so if they read the qr code that is not from the company it should return a message “…”

Try what Balajidev said:

I did it as you told me, it already throws the message but it also does it with the codes that do have the structure, I show you my blocks.

Can u provide a screenshot of error

Right now it does not show error messages, it only throws the message when it is not fulfilled.

I share a JPG of the process.

1 Like



It doesn’t give any error in my case

Good, Means your problem is now solved.

Thanks a lot! It worked for me, I was placing another comparison block, with its blocks I was able to realize the error, it was solved, I thank you.


Tanks. @Balajidev

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.