Barcode scanning
Barcodes and QR codes are methods of representing data in a visual, machine-readable form. Barcode scanning is a must-have feature for many field sales scenarios. If your device is equipped with a camera with autofocus (and most modern devices are), you can use barcode scanning in Resco Mobile CRM.
Tip | (Android only) When you initiate barcode scanning in the app, on selected devices, the app also starts registering NFC broadcast intents. |
Change field format to barcode
If your entity has a field that can be read from a barcode, you must change the formatting of the field using Woodford.
- Edit an app project and select the entity from the Project menu.
- Select the field. It must have the type Single Line of Text.
- On the Properties pane, set Formatting to Barcode.
- Click Save.
For more information about managing entities and fields in Woodford, see Managing entities.
Use barcode in forms
If you add the field with barcode format to your form, the app displays a custom button that initiates camera and barcode scanning. The scanned value is saved to the field.
Use barcode in views
You can enable barcode scanner functionality to find records in views, particularly lookup views. You will notice barcode scanner icons. When you tap this icon, the camera turns on and when you focus it on the barcode or QR code, it recognizes the value and compares the value with the field set to barcode formatting. If the value is found, the record is selected.
There's a subtle difference between the buttons in the top caption row and search bar:
- The caption button is used in lookup views. If the search is successful, the record is automatically added to the field from which it was called.
- The search bar button is useful in all views and serves simply an alternative way to search and filter records.
Note | To use barcode scanning in views, the barcode field must be enabled in the view. Edit the view in Woodford, click Select Fields and verify that the field is enabled. |
Use barcode in inspections
The Questionnaire Designer includes a dedicated question type called Barcode. When answering the questionnaire, users can tap the button to initiate barcode scanning. The information represented by the barcode is then saved in the answer as a string.
Use barcode in reports
You can use custom barcode fonts to print barcodes to your mobile reports. The following example will guide you through the process.
Note | Various barcode standards use start codes, stop codes, and/or checksum to ensure the code isn't tampered with. Resco reports do not include this function out of the box; you must calculate any necessary checksum manually and include them in the barcode to make the barcode compatible with standard barcode scanners. You can often find implementation details online, for example, for Code 128, check this third-party blog. |
You can generate QR codes from report data and display them on the report.
Use barcode in rules
You can use rules to initiate barcode scanning and save the result.
Supported barcode formats
The list of supported barcode formats depends on the platform:
- On iOS, Resco Mobile CRM uses native iOS API.
- On Android and Windows, Resco Mobile CRM uses https://github.com/micjahn/ZXing.Net/.
Restrict barcode length
If you want to restrict barcode length, you can specify the exact required barcode length: enter a non-zero Barcode Length on the UI tab in Woodford Configuration. Codes that don't match the prescribed length are silently ignored.
Another restriction can be done on the field level. Database admins can set up the maximum length of field strings. App displays a warning if you attempt to scan a barcode that exceeds the maximum length.
See also
- Quick tip: Barcode scanning Blog
- Use QR code for quick logins Blog
- Tailoring the mobile report: How to use customized and barcode fonts Blog
- AI Image Recognition - using AI image classification for use cases similar to barcode scanning
- Barcode scanning in action YouTube