Integrating QR Code to Open a Survey with Pre-Loaded Data from the QR Code

03-22-2023 02:45 PM
New Contributor

First, pardon my ignorance as I am very new to Survey123 and GIS in general.  I began exploring a few months ago so if I have the incorrect lingo/terminology I apologize in advance or if this has been addressed already, please point me in the right direction.

Here is what I am looking to accomplish:  I would like to establish QR codes through QR code generator or similar service for all my assets, let's label them 1, 2 and 3.  When you scan the bar code, it will open my survey and populate my asset field with a 1, 2 or 3 depending on the QR code scanned.

I have created my survey in Connect already.  However, I would like my Survey to be activated utilizing a QR Code pre-loaded with data on it already.  I know that Survey123 provides a QR Code to the survey, but that link cannot be used in a QR Code generator, or at least I am doing it wrong, because the http is "incomplete". 

Additionally, I would like to know how to have the same QR Code be scanned by two different people, separately at different times.  For example, for asset 1, once the bar code is scanned, person 1 can complete delivery information part of the survey and save a draft.  Then the barcode is provided to person 2, who completes receiving information part of the survey.

Any assistance for this ignorant newbie that is trying to learn as much as possible and diving deep into this is greatly appreciated.

0 Kudos
4 Replies
Esri Regular Contributor

Hello @JoeGross

The first suggestion/consideration is decide if you want your QR code to link to the Survey123 web app, the Survey123 field app, or let the user decide. This is because the URL to use is slightly different for each workflow. 

From there you will need to use the field:fieldname=value URL parameter(s) to prepopulate the field in the survey. 

Good places to start are the Survey123 Tricks of the Trade: Web form URL parameters and Understanding Survey123's custom URL Scheme Esri Community blogs. Depending on if you are planning to use the web app or field app the Integrate with other apps documentation has really nice tables that show what URL parameters are supported for both workflows.

 Since you are want to use a QR code if you want to open the Survey123 field app the custom URL scheme isn't going to work, but Survey123 links will ( although both use the exact same parameters so the information in the custom URL scheme blog also applies if you are using the Survey123 link

As for the same QR code being scanned by two different people, saving a survey to a draft is only local to person 1's device. Person 2 on their own device would not be able to access a draft survey that's on person 1's device. The workflow I would suggest to answer the second question assumes you already have the assets in your GIS infrastructure (meaning you already have a feature service with the asset locations and asset ID in the attribute table) and you only need to edit the data as opposed to collect new records. 

In this scenario I would suggest using URL parameters to edit the existing record so that when person 1 scans the QR code they are brought to the record and can fill out the delivery information. They will need to submit the survey, then person 2 can scan the QR code again, the same record will be opened and they will be able to complete the receiving information. 

Depending on how you want this set up it may require some logic in the form to only show or hide sections of the survey depending on what's already been filled out. 

Thank you,
0 Kudos
New Contributor

Thanks Zach.  I am going to try this out and let you know how it goes.  I appreciate the assistance.

0 Kudos
New Contributor

Hi Zach.  Do you think this is something you would be able to do for me?  I haven't been able to begin the undertaking and would be able to pay to have this completed.  Please let me know and we can have an offline discussion.

0 Kudos
New Contributor III

Hi Zachary,


I would like to see if a similar workflow would exist where we scan QR Codes to open a Survey123 in the field app.  We want to have large scale plots and print out QR Codes to attach to flags (hundreds of them), and when you scan the flag four features associated with that flag (Flag Number etc.) autopopulate in a survey.  I am not sure where to start, if I want to use a QR code generator but the only consistent information between flags would be obviously the form's Item ID so it opens the form correctly....  Is this possible with hundreds of flags (points).

0 Kudos