Tutorial: Designing for barcodes
This tutorial is for setting up the barcode scanner functionality in your Forms. The barcode scanner offers a more efficient means of identifying a record when out in the field, especially for databases that contain a large volume of records. The barcode scanner allows you to instantly identify a specific record from a printed barcode using the camera of your mobile device.
You can use the barcode scanner in a number of scenarios including:
- Identification of program participants during activities
- Monitoring the status of assets in the field
- Tracking movement of inventory
- A set of pre-printed barcodes (Note that ActivityInfo does not currently have the ability to generate barcodes natively. You will need to use a third-party barcode generator to do this.)
- A mobile device with a built-in camera
Step 1: Set up the Reference Form that will contain your reference records
The first thing you will need to do is set up the form that will contain the records that you would like to reference using barcodes. For example, this could be a form that contains the list of beneficiaries that you would need to uniquely identify.
In this form, add a Barcode field by selecting the Barcode field type from the Fields palette.
Step 2: Populate the Barcode field in your Reference Form
Once the Barcode field has been added in your Reference Form, you can then assign to each record a barcode from the set of barcodes you already have. You can assign a barcode when:
- Creating a new record OR
- Editing an existing record
Using the ActivityInfo app on your mobile device, first navigate to your Reference Form. Click on Add Record, and once you arrive at the Barcode field, simply scan your pre-printed barcode using the camera of your device. The form will then automatically pull the corresponding code and store it in the Barcode field. You can then populate the rest of the fields normally.
2b Editing an existing record
Using the ActivityInfo app on your mobile device, first navigate to your Reference Form. Select the record you wish to edit, then click on Edit Record. Once you arrive at the Barcode field, scan your pre-printed barcode using the camera of your device. The form will then automatically pull the corresponding code and will update the code previously stored in the Barcode field. Finally,click on Submit Record to save your changes.
Step 3: Set up the Form(s) that will track data against your reference records
Now that you have the barcodes set up in your reference records, you can navigate to the form that will track data against those records (for example, a form that tracks beneficiaries’ training attendance).
Simply add a Reference field to this form and select the form that contains your barcodes.
Once you have added the Reference field, no further action is required to enable the barcode scanner. Because the form you are referencing contains a Barcode field, the option to scan a barcode will automatically be enabled.
Step 4: Scan the barcode to find the correct record
You are now ready to track data that references other records using barcodes. Using the mobile app, navigate to the form where you will be tracking data against your reference records. Click on Add Record and begin populating the fields as normal.
Once you arrive at the Reference Field (which links to your referenced form containing your stored barcodes), the barcode scanner will automatically appear above the standard dropdown lists that appear for reference fields. Click on “Scan barcode with camera” to launch your phone’s camera app and take a photo of the barcode. The form will automatically pull the corresponding code.
Note that the dropdown list is still available, but scanning barcodes is a convenient alternative to quickly find the specific record you need, especially if you have a large list of reference records.
If the barcode matches the code of an existing record from your Reference form, the record will appear along with a green arrow, indicating a match. From here, you can then proceed to populate the rest of the fields in the form as you would normally.
If the barcode does not match the code of an existing record from your Reference from, then you will see the error message below:
In this case, you will need to go back to your Reference form and create a new record with this barcode as detailed in Step 2.
And there you have it! That is how you can utilize barcodes to more efficiently identify records and track any relevant information from those records on ActivityInfo