20
Views
4
Comments
Solved
How to generate QR code on click of button
Question
Application Type
Mobile

Hello people,


I have the following plugin : 


What i want to achieve is the following: i have a form, when this form is saved to the DB it needs to generate a QR code for this form and save it to the database, so that when you scan this QR code it needs to open this form. I really do not know where to start, can someone help me out?

Rank: #369
Solution

Hi Samed,

Since this is the same question as you asked some days ago (https://www.outsystems.com/forums/discussion/66031/how-can-i-generate-a-qr-code-of-a-form/#Post261737) I reckon you couldn't find a solution.

First of a, a QR-code is not something you store in the DB. It's a visual representation of a piece of data, a text string. You can only show a specific code or a complete URL as a qr-block.

As I read you question, I think you need multiple things:

- QRCodeGenerator to show the QR code. I would suggest you generate a unique key, a GUID, that you also sotre in the database when you store the data in the form for the first time. Using the record's ID would also work, but this is less safe. When the form is show on a screen (I quess not a mobile app, otherwise you wouldn't need to scan it) or is printed, you can show the QR Code using Generate_QR_Code and provide the GUID to the TextValue. 

- A Barcode scanner (e.g. Barcode Plugin). You need this plugin to be able to scan the QR-code that you've generated earlier. You can then use the san result (the GUID-code) to get the record with that code from the database and show it on you phone.

Have you already gone through the mobile developer course?

Rank: #6872

@Lennart , Thank you very much for your answer, i finally managed to make it work!

Cheers!