Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 34 Next »

Description

The Mobile app can convert custom barcodes into the recommended Encoded Barcode (GS1)Barcode converters are configured using Mobile Configuration Files

Global

When you want custom barcodes to be handled in the entire app.

  • Configured using "start.cfg"

Page-specific

When you want custom barcodes only to handled on a specific page.

  • Configured using "Application.cfg"

Format

Converter expressions are wriiten as Regular Expressions

Examples

Length

Description

^(\d.*)$

Any alfa-numeric string → converted to GS1 Item

^(\d{1,13})$

Only 13-digit EAN numbers -> converted to GS1 Item


Example 1: Page-specific: Code39 converted to GS1 Item on Receive Lines

Since AI91 is 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 14 char, but can be arbritary length since AI91 allows for this.


Change in Application.cfg
<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,14})$" expressionAis="91"/>
    </scanToSelectBehaviour>
  </orderLinesConfiguration> 
...
 

Example 2: Global: Custom barcode converted into four AI's

Different positions of a barcode value, is broken into several "AI". See table below.

Change in Start.cfg
...
<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>
...


Example 2 position mapping table 

AI

Position

Length

Description


1

2

Organization, fixed value "64"

10

3

8

External Order No.

37

11

4

Quantity

92

15

3

Quantity per Unit of Measure

91

18

10

SupplyID (Vores interne varenr)


Note: See Register with Encoded Barcode (GS1) for a list of default AI's.


Example 3: 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.

Change in Start.cfg
... 
 <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>
...


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

https://regex101.com/ 

  • Regular expression: ^(\d{1,6})(\d{1,5})$
  • Test string: 11111122222








See also

  • No labels