Use QRcode reader to fill in form responses

hello everyone.. I've been looking here on the forum for something similar but I haven't had success in finding answers or similar topics..

I would like to know if there is any possibility of an answer returned from a QR code read by the ODK collect(app), where it can fill (using some syntax perhaps) the subsequent questions?

and if this is possible for an answer, since the QR reader can return texts or numbers, if it is a very large text and has any character separating the type of questions, it is possible to use this character for the subsequent text to fill the questions following ???
I hope someone can understand... thank you very much for your attention. !!

I understand that you wanted to scan a QR code and obtained a text, then extracted part of the text to do something else. I thought about using calculate to extract some text but I couldn't find anything relevant.

Maybe someone from the community can jump in.

1 Like

Hi @BrunoAngelo,

As @Trung wrote the process is straightforward by using calculate questions with [string functions] (https://docs.getodk.org/form-operators-functions/#strings). substr, substring-before, substring-after could be very useful for your purpose.

1 Like

Hi @BrunoAngelo, I think you can use Barcode question type in your form design: https://docs.getodk.org/form-question-types/#barcode-widget

1 Like

hello, thanks for replying... have you done something similar? do you have any idea if the calculations can do this and fill in the subsequent questions automatically ???

hello, thanks for replying, but I think you didn't understand what I want... I would like the QRcode reader to take the text that shows in the qr code and then use this text to fill in other questions like choose one, or multiple choice

1 Like

I think you'll find this post useful: Steps of printing barcode and auto fill the for by scanning barcode and continue updating another form - #9 by LN

In that sample form, I used extra questions to ask for confirmation. You could instead use dynamic defaults to set values at the time of QR code scan and allow the user to override them.

That example is also linked to from the documentation (see the bottom of that section). You may also be interested in some of the approaches that use a barcode in the field but keep related information in a CSV form attachment.

hello..thank you so much for answering my question. and it was also not very clear how I remove the information brought in when reading the qrcode and separate them by making them fill in the subsequent questions...

but, perhaps another solution can serve. example: if I already have a database with several information about a product, these "information" are answers to the questions on the form, and each product has a unique number, an id may or a code, I can use this unique number to fill in the form exactly with the information I don't have data. "validity data" filled in 01.01.2022, in the question "type of product" filled in by "soda" and so on.. is this possible?? how do i do it??