Link QR's to DB content

Hey all,

Newbie here. Just playing with Retool and RetoolDB

Are there any resources on how I would link a QR to an item in a Database?

I want users to scan a QR and see information.

Do I need to auto generate QR inside Retool or do I upload my own?

Thanks

Hello, welcome,

What do you specifically want to do? Do you want (retool licenses) users to scan a QR with a retool application? Or do you want any person to be able to scan a QR code from for example the camera app on their mobile?
Do you generate the QR codes yourself so you can decide yourself what info in embedded in the QR?

It is definitely possible to lookup information from a (retool) database. How to achieve this depends a bit on what you want to achieve.

I am for example using QR codes on our logistic documents. When scanning the QR code, I lookup the contents of the pallet from a database.

Thanks for the reply.

I currently have QR codes that load web pages with inventory details.

I'd like to bring this all into an app.

So users download the app (free no login/reg) scans a QR to see the details pulled from a Retool database within the app.

So like you, they use the app, open the scanner (camera)within the app then scan the QR and it looks up the content from the DB.

It's possible to reference URL params from your Retool app (docs here!) with that, you could create a QR code for a URL that has params indicating which record needs to be fetched from your DB and then display information about that record in your Retool app. If you'd like for users to be able to access this without authentication you can explore doing so using a public app. Does that seem like it might work?

good to know that this is possible. Was also thinking about a public app, but didn't know how to automatically fetch data.

@frosdick do keep in mind that if you're going this way, your inventory will have/need a static url within the QR code. If the url changes for some reason, the URL is useless and you'll have to change all the QR codes.
Having a SKU within the QR makes much more sense and gives you way more flexibility.

1 Like

Thanks that's good to know. I learned the free public app requires business plan at $60 a month, so that's good.

Thanks @mbruijnpff I need to read up and understand this more but good to know about static QRs.

So what happens if I already have QRs going to webpages and I build an app in Retool. Does my Retool app automatically prompt the user to open a web browser to view the page?

Or does that have to be coded in the app to say what action to take if the QR data not detected?

You can configure a scanner component with event handlers to work with the data. With that, you can either send the user to a URL or trigger a query that fetches a record based on data in the QR code like @mbruijnpff mentioned. Do either of those seem like they might work?