Split a GS1-128 Barcode into Lot, Expiry and Weight
Split a scanned GS1 barcode into named parts, choose which field each part fills, and check it with a sample and the simulator.
What you will learn
- Open Barcode parts on a scan field and split a GS1 barcode into its parts
- Name the parts and choose which field each one fills
- Add more parts, such as the net weight, and see numbers and dates read as real values
- Test with Try a barcode and Simulate; other barcodes split by position, character or pattern
Transcript
In this guide you will split one scanned barcode into parts, so a lot number, an expiry date and a weight each land in their own field. We will use a G S one barcode, the kind printed on shipping cases.
This app, Goods Receiving, has a field named Case label that a worker scans, and three more fields: Lot, Expiry date, and Net weight. The case label is a GS1 barcode, so one code holds all of that. We want a single scan to fill every field.
Select the Case label field, and scroll down in its settings to Barcode parts. Open it. Under Split the barcode, the choices are a GS1 barcode, fixed positions, a separator character, or a pattern. Choose GS1 barcode.
StepVane adds four parts, named by the standard: the GTIN, the batch or lot, the expiry date, and the serial number. Each part shows its code in brackets, and its kind, text, number or date.
Now say where each part goes. Under the batch or lot, find Also fill, and pick the Lot field. Do the same for the expiry date, and pick the Expiry date field. A part can also be left unused.
The weight is not in the list yet. Open Add a part, and choose Net weight in kilograms, code 310. Fill the Net weight field with it. A weight becomes a number, and an expiry date becomes a real date.
Try it right here. Type a sample barcode in the Try a barcode box. Studio shows what the field keeps, and one line for each part: the GTIN, the lot, the expiry date as March 31, 2027, and the net weight, 4.25. At the bottom, it says Accepted. A wrong check digit, or a date that does not exist, is refused here, just as the phone would refuse it.
Now press Simulate, and scan the barcode. The case label keeps the barcode, the parts are listed under it, and the Lot, the Expiry date and the Net weight are filled from that one scan. Each part also gets its own column in Records, so you can export it.
That is how you read the parts of a barcode. For a G S one barcode, StepVane already knows the codes, and checks the digits for you. For any other barcode, split it at fixed positions, at a character, or with a pattern.
Related
More guides
Start with one device today
Free for Studio, one handheld and one worker. No cloud account, no credit card.