Skip to content
  • There are no suggestions because the search field is empty.

How to validate a specific product metadata code within a barcode

This article takes you through validating a specific code within a barcode. Example: Ignore the first 3 digits, validate the code from the metadata and ignore the rest.

Step 1 - Create the valid field by:

  • Drag in the field you are validating
  • Drag in the 'match regex' sign from the Math Operators
  • Drag in the 'Value' field and enter
    ^.{3} 
  • Drag in the '+' sign from the Math Operators
  • Drag in the 'Product Data' from the Special Fields section and select the correct product data. I.e. code.
    data["barcode"]=~("^.{3}"+jobmeta["code"])

Step 2 - Invalidate everything outside of the valid range by using "1==1"