Select to view content in your preferred language

How to create a barcode

880
0
10-29-2019 09:42 AM
RobertBorchert
Honored Contributor

You can scan barcodes in collector to enter data. I have searched the forums and the help but I am having a time trying to find out how to make the bar codes.  I know there is software out there to generate bar codes etc. but I don't know if they would work with Collector, also I would like to be able to update multiple fields with one scan.

The best I could find was the Arcade expression at the bottom of this post.  But no instructions on how to use an arcade expression  to print a barcode that can put on a sticker.

var base62 = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";

var BARCODE = $feature.BARCODE;

// extract the encoded lot number from the barcode
var lotnumberEncoded = Mid(BARCODE,2,4);

// unencode the lot number
var manufacturerLotCode = 0;
for (var z=0;z < Count(lotnumberEncoded);z++) {
  manufacturerLotCode = manufacturerLotCode *
Count(base62) +
   
Find(Mid(lotnumberEncoded,z,1), base62);
};

return (manufacturerLotCode);

Tags (4)
0 Kudos
0 Replies