# Use QRcode reader to fill in form responses

**URL:** <https://forum.getodk.org/t/use-qrcode-reader-to-fill-in-form-responses/38334>\
**Category:** Support\
**Created:** [July 18, 2022, 1:25am UTC](https://forum.getodk.org/t/use-qrcode-reader-to-fill-in-form-responses/38334 "2022-07-18T01:25:45Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![BrunoAngelo](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/brunoangelo/32/17291_2.png) [@BrunoAngelo](https://forum.getodk.org/u/BrunoAngelo)\
**Post date:** [July 18, 2022, 1:25am UTC](https://forum.getodk.org/t/use-qrcode-reader-to-fill-in-form-responses/38334/1 "2022-07-18T01:25:45Z")

</div>

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. !!

---

<div class="post-metadata">

**Author:** ![Trung](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/trung/32/10396_2.png) [@Trung](https://forum.getodk.org/u/Trung)\
**Post date:** [July 18, 2022, 3:47am UTC](https://forum.getodk.org/t/use-qrcode-reader-to-fill-in-form-responses/38334/2 "2022-07-18T03:47:18Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Alexander\_Torrado](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/alexander_torrado/32/2720_2.png) [@Alexander\_Torrado](https://forum.getodk.org/u/Alexander_Torrado)\
**Post date:** [July 18, 2022, 12:21pm UTC](https://forum.getodk.org/t/use-qrcode-reader-to-fill-in-form-responses/38334/3 "2022-07-18T12:21:12Z")

</div>

Hi @BrunoAngelo,

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

---

<div class="post-metadata">

**Author:** ![Sadiq\_Khoja](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/sadiq_khoja/32/3719_2.png) [@Sadiq\_Khoja](https://forum.getodk.org/u/Sadiq_Khoja)\
**Post date:** [July 18, 2022, 2:56pm UTC](https://forum.getodk.org/t/use-qrcode-reader-to-fill-in-form-responses/38334/4 "2022-07-18T14:56:32Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![BrunoAngelo](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/brunoangelo/32/17291_2.png) [@BrunoAngelo](https://forum.getodk.org/u/BrunoAngelo)\
**Post date:** [July 18, 2022, 6:32pm UTC](https://forum.getodk.org/t/use-qrcode-reader-to-fill-in-form-responses/38334/5 "2022-07-18T18:32:45Z")

</div>

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 ???

---

<div class="post-metadata">

**Author:** ![BrunoAngelo](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/brunoangelo/32/17291_2.png) [@BrunoAngelo](https://forum.getodk.org/u/BrunoAngelo)\
**Post date:** [July 18, 2022, 6:37pm UTC](https://forum.getodk.org/t/use-qrcode-reader-to-fill-in-form-responses/38334/6 "2022-07-18T18:37:43Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![LN](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/ln/32/1605_2.png) [@LN](https://forum.getodk.org/u/LN)\
**Post date:** [July 18, 2022, 7:27pm UTC](https://forum.getodk.org/t/use-qrcode-reader-to-fill-in-form-responses/38334/7 "2022-07-18T19:27:30Z")

</div>

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](https://forum.getodk.org/t/steps-of-printing-barcode-and-auto-fill-the-for-by-scanning-barcode-and-continue-updating-another-form/10786/9)

In that sample form, I used extra questions to ask for confirmation. You could instead use [dynamic defaults](https://docs.getodk.org/form-logic/#dynamic-defaults-from-form-data) 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](https://docs.getodk.org/data-collector-workflows/#using-data-from-previous-encounters) (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.

---

<div class="post-metadata">

**Author:** ![BrunoAngelo](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/brunoangelo/32/17291_2.png) [@BrunoAngelo](https://forum.getodk.org/u/BrunoAngelo)\
**Post date:** [July 19, 2022, 1:56am UTC](https://forum.getodk.org/t/use-qrcode-reader-to-fill-in-form-responses/38334/8 "2022-07-19T01:56:48Z")

</div>

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??
