//Script for UPDM 2019 Data Models
//Script to decode and populate the MANUFACTURER value from the BARCODE value

if ($feature.BARCODE == null)  // Preserve original MANUFACTURER value if BARCODE is null
   return $feature.MANUFACTURER;

return mid($feature.BARCODE,0,2)