Versions Compared
Key
- This line was added.
- This line was removed.
- Formatting was changed.
Description
Excerpt |
---|
The Mobile app can convert custom barcodes into the recommended Encoded Barcode (GS1) |
Use case
You should use always use or print GS1 barcodes See Best Practice: Labeling Items.
However, some times this is not possible and other types like simple barcodes, must be scanned.
Use converters to capture, identity and convert barcodes to GS1 AI's. See Encoded Barcode (GS1).
Global usage (Most commonly used)
When you want custom barcodes to be handled in the entire app.
- Configured using "start.cfg" Scanner Configuration
Searching order lines
When you want to search Order Lines page by barcode.
- Configured using "Application.cfg" Mobile Configuration Files
Converter Examples
Converter expressions are wriiten as Regular Expressions
Convert from | Convert to | Expression | Description | Value examples |
---|---|---|---|---|
Simple Code39 | Quantity AI 37 | ^(\d{1,4})$ | Only from 1 to 4 digits | 1,11, 111 or 1111 |
EAN13 numbers | Item AI 91 | ^(\d{13})$ | Only exactly 13-digits | 1234567890123 |
Tip: To make sure no partial matces are made, use capture groups "()" and also "$" to end the expression.
-
-
Example 1: A very custom barcode converted into four AI's
Different positions of a barcode, is broken into diffent AI's.
- expression: The regular expression
- expressionAis: The order in which the different capture groups into AI's
Code Block | ||||
---|---|---|---|---|
| ||||
... <scanner> <type>internal</type> <converter enabled="true" type="custom2gs1"> <customConfiguration expression="^64(\w{1,8})(\d{1,4})(\d{1,3})(\w{1,10})$" expressionAis="10,37,92,91"/> </converter> ... |
Mapping table
AI | Position | Length | Description |
1 | 2 | A fixed value that is always "64" | |
AI 10 | 3 | 8 | External Order No. |
AI 37 | 11 | 4 | Quantity |
AI 92 | 15 | 3 | Quantity per Unit of Measure |
AI 91 | 18 | 10 | SupplyID (Internal item) |
Example 2: GS1 barcode converted to GS1
convertGS1Input: Should be set to true if one wishes to convert from a GS1 barcode to GS1.
This could be in cases when the barcode scanned contains AIs that are not supported and when printing a new label is not an option.
Code Block | ||||
---|---|---|---|---|
| ||||
... <scanner> <type>internal</type> <converter enabled="true" type="custom2gs1" > <customConfiguration expression="^01(\d{14})11(\d{6})21(.{1,})$" expressionAis="91,10,21" convertGS1Input="true"/> </converter> ... |
Example 3: Long item numbers as Code39 - converted to GS1 Item on Receive Lines
Since AI91 is already regarded as "Item No." but without the length constraint of AI01,
This can be used for many 1D (linear) barcodes like Code39 or Code128.
In this example the data is 20 char, but can be arbritary length since AI91 allows for this.
Code Block | ||||
---|---|---|---|---|
| ||||
<page id="ReceiveLines" type="OrderLines" icon="mainmenureceive"> <title defaultValue="@{PageReceiveOrderLinesTitle}"/> <orderLinesConfiguration suggestQuantity="true" verifySingleScanRegistrations="false" actionOnEmptyList="ClosePage"> <service id="Receive"/> <list listId="OrderLines"/> <...> <scanToSelectBehaviour gs1SearchTerm="Item" behaviour="Auto"> <converter expression="^(\d{1,20})$" expressionAis="91"/> </scanToSelectBehaviour> </orderLinesConfiguration> |
Error message
Invalid barcode format Barcode format error 'Invalid length'. The scanned value was 'xyz'
This can be the result of using AI01 which defines a fixed length of 14 char.
Use AI91 instead.
Online Editor
Use an online editor to test your regular expressions.
Example
- Regular expression: ^(\d{1,6})(\d{1,5})$
- Test string: 11111122222
See also
Filter by label (Content by label) | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|