Rule examples
Below, you can find three rule examples to help you understand how to create specific rules.
Example 1: Add the prefix 0
To add a 0
at the beginning of all scanned barcodes:
- Type in the Rule Name.
- Select a Trigger. (E.g. Incoming Barcode)
- Under Actions, click Add.
- Under Edit Action, select Add Prefix.
- Under Insert this string as a prefix of a barcode, type in
0
and select Save Action.
The selected Action displays under Actions. - Click Save Rule.
The rule displays in the list. After you import the configuration to your Android device, you will see a0
in front of all your scanned barcodes.
Example 2: Add the prefix 0
for 12-digit barcodes
This rule will only affect the 12-digit barcodes. All other barcodes will be scanned and sent without modification.
To add a 0
at the beginning of 12-digit barcodes:
- Under Conditions, click Add.
- Under Edit Condition, select Length Equals and type in 12 as your barcode length.
- Select Save Condition.
- Under Actions, click Add.
- Under Edit Action, select Add Prefix.
- Under Insert this string as a prefix of a barcode, type in
0
.
- Select Save Action.
- Select Save Rule.
The rule displays in the list. After you import the configuration to your Android device, all 12-digit barcodes will have the prefix0
.
Example 3: Replace FN1
with [
This rule replaces all instances of FN1
with [
. All other barcodes are scanned and sent without modification.
To create rule:
- Under Conditions, click Add.
- Under Edit Condition, select Barcode Contains and type in
FN1
for the string.
- Click Save Condition.
- Under Actions, click Add.
- Under Edit Actions, select Replace With Regex.
- Under Regular Expression type
FN1
, and under Replacement Text type[
.
Note: Make sure to select Apply to All so that all instances are modified.
- Select Save Action.
- Select Save Rule.
The rule displays in the list. After you import the configuration to your Android device, all barcodes containing the stringFN1
will replace the string with[
. All other barcodes will be scanned and sent normally.