Once you have added a barcode scanning field to your form, you may want the form to automatically populate information about the item scanned in subsequent fields. Barcodes are only as useful as the information that it represents. Using reference data, we can accomplish this, saving precious time in the field and reducing errors.
Format the File
The process for formatting a file containing a barcode is exactly the same as any other reference data file. Examples for this use case will be included in this article but the details have been laid out more thoroughly in our article on How to Properly Format a Google Sheet or CSV File for Reference Data.
In our example below, we are using barcodes to identify products in a grocery store, what aisle the item can be found in, and the remaining inventory.
Upload the File
There are several methods to upload your file to GoCanvas. If you are in the Advanced Form Builder, a .csv file can be uploaded from within the builder or on the Reference Data & Images tab. If you are using Builder BETA or Google Sheets, all reference data files must be uploaded on the Reference Data & Images tab. Learn more the Google Sheets integration here.
Note: If you are adding reference data to a Department, click My Department.
Mapping the Fields
The steps to map the columns in the file to the fields in the form follow the same process as is detailed in, "How to Map Reference Data to your Fields in the Advanced Form Builder." In this example, the barcode field is the parent field and will determine how the remaining three fields populate.
Note: barcodes are not limited to only being parent fields, they can also be used in dependencies, which you can learn more about in our article about dependent reference data.
1. Edit an existing form or select Create New to start a new form.
2. Find or create the barcode field that will be the parent field. Select it to open Field Settings in the left panel.
3. Expand the Reference Data tab.
4. Select the correct reference data file from the first drop down menu.
5. The Reference Column is the column of data from your file that you want to appear in this field. We named both our column and field "Barcode" so this step is easier. The parent field is complete after the reference column is selected.
6. Find or create the next field that will be attached to the reference data. Select it to open Field Settings in the left panel.
7. Expand the Reference Data tab.
8. Select the same reference data file used for the parent field from the first drop down menu.
9. Choose the column of data from your file that you want to appear in this field. The next column in our file is "Product."
10. In order to have this field know automatically what field value is needed based on the selection in the parent field, we need to tell it where the parent field is located and what it is called.
Reference Screen - This is the name of the screen where the parent field is located. The parent field could be located either on the same screen or on an earlier screen.
Reference Field - The name of the parent field.
Repeat steps 6 through 10 until all columns are mapped to the reference data file. Save and publish to test your form.
Comments
2 comments
Good day
If I scan one QR code with multiple details can this be separated on different fields on GoCanvas?
EX:
Product: Pangrease CF
B/N: 2109-214
DOM: 27/09/2021
EXP: 02/22
1000 L
Or will I have to make a QR code for each entry?
Is there a way to make it not editable like the drop downs? I want to scan but only allow values contained in the ref data list to populate.
Please sign in to leave a comment.