Barcode
Last updated
Last updated
Barcodes usually comprise of multiple codes combined into a single string, which you may want to parse during production.
TilliT allows for you to manually type in the barcode, but if you are using a mobile device, you can download a third-party Barcode Keyboard to scan barcodes instead. Barcode keyboards present an option in your device's on-screen keyboard to utilise it's camera as a barcode scanner. You can find whichever one suits you by searching "Barcode Keyboard" in your device's app store.
In this example, the user is using and android phone and has installed Scanner Keyboard by TEC-IT as their keyboard. When the user taps in the barcode field, the keyboard is brought up. They tap the barcode option presented in the keyboard (highlighted with the red box). They then tap "Scan Barcode". The camera opens and a yellow box shows that it detects a barcode, translates this to a text string and inputs into the field in TilliT.
To parse a barcode, the Barcode data type requires you to configure two properties:
Barcode field length
Barcode fields
For this example, we will parse an EAN 13-digit barcode. First we must create the elements in TilliT in which we wish to parse the fields to:
We set the field lengths as 2,5,5,1 and the Barcode fields set as CountryCode,ManufacturerCode,ProductCode,Checksum using the item keys from the above elements. So now we have 4 field lengths and their related fields defined:
Now we enter the barcode in TilliT and the Barcode will Parse the fields across to each item:
If we decide we only need some of the data from the barcode, we can leave fields blank and delete the elements we don't need. For example, if all we wanted was the Manufacturer and Product codes, we could delete the Country Code and Checksum elements. We leave the barcode length, but re-configure the Barcode fields:
Notice the Barcode field length is still defined to parse the barcode into 4 strings, which is still required to define where to break up the barcode. However, the Barcode fields only state the 2nd and 3rd field, leaving the other 2 as null. This allows us to define which fields we are parsing and which we are ignoring. In the activity, we see the field completing the elements as before.