HOW TO

Differentiate between manual and scanned data entries for barcode questions in ArcGIS Survey123

Last Published: August 24, 2023

Summary

In ArcGIS Survey123, the barcode question type is displayed in the survey form with a text box and a 'Scan barcode or QR code' The Scan barcode or QR code icon icon by default. Field workers can either manually type or tap the 'Scan barcode or QR code' icon to scan a barcode with the device’s camera, and the value read from the barcode is displayed in the text box.

A sample barcode question in the Survey123 field app

With a single barcode question, there is no way to identify whether the data is scanned or manually entered. This article provides the workflow to differentiate between manual and scanned data entries for barcode questions in ArcGIS Survey123 by configuring the XLSForm in ArcGIS Survey123 Connect. This is useful if field workers are unable to scan barcodes in certain locations, and these entries must be identified among the survey results.

Procedure

  1. Open the survey’s XLSForm in ArcGIS Survey123 Connect.
  2. Add a barcode question type and set the appearance to minimal. Refer to ArcGIS Survey123: Barcodes for more information. The default barcode question is displayed with a text box and a 'Scan barcode or QR code' icon. By setting the appearance to minimal, the text box is removed from the display and prevents manual entries of the barcode question.
  3. Add a text question type. In the calculation column, type the formula provided below and replace <field_name> with the name of the barcode question in the name column.
${<field_name>}
The formula configures the text question to auto-populate the barcode question value when a barcode is scanned.
  1. Add a calculate question type. In the calculation column, type the formula provided below and replace <field_name> with the name of the barcode question in the name column.
if(string-length(${<field_name>})>0,"<variable1>","<variable2>")
The formula configures an additional field to be created in the data table that identifies whether the data is manually entered or scanned. <variable1> and <variable2> are the texts to distinguish between manual and scanned entries. In this example, <variable1> is 'Barcode' and <variable2> is 'Manual Entry'.
  1. In the hint column of the text question, type the formula provided below and replace <field_name> with the name of the calculate question in the name column.
Source: ${<field_name>}
The formula configures the text question to display 'Barcode' or 'Manual Entry' above the text box of the text question, depending on the method of data entry.
The sample survey's configured XLSForm spreadsheet is shown below.
The survey's configured XLSForm spreadsheet
  1. Save the spreadsheet and in Survey123 Connect, click Update survey from XLSForm spreadsheet The Update survey from XLSForm spreadsheet icon. Click Publish survey The Publish survey icon to publish the survey.
  2. Open the survey in the ArcGIS Survey123 web app and navigate to the Data tab to view the survey submissions in the data table.

In the data table, the additional field created from the calculate question type displays whether the data is manually entered or scanned from a barcode. In this example, the 'assetIDSource' field displays 'Manual Entry' or 'Barcode' to distinguish between manual and scanned data entries.

Displayed below is the sample survey form with the minimal appearance barcode question and text question in the Survey123 field app.

The minimal appearance barcode question and text question in the Survey123 field app

The data table below displays the manual and scanned data entries in the ArcGIS Survey123 web app.

The additional field in the data table displaying manual and scanned data entries in the ArcGIS Survey123 web app
Note:
The empty barcode fields in the data table also indicate manual data entries.
Empty barcode.jpg

Article ID: 000030953

Software:
  • ArcGIS Survey123 Field App iOS
  • ArcGIS Survey123 Field App Android
  • ArcGIS Survey123 Connect
  • ArcGIS Survey123 Website

Receive notifications and find solutions for new or common issues

Get summarized answers and video solutions from our new AI chatbot.

Download the Esri Support App

Related Information

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options