Skip to main content



Parsing scanned data


1 comment

  • Avatar
    Peter Thane

    BarTender 2016 is not the latest version of BarTender, it has been superseded a couple of times and BarTender 2022 is the current version. However VB was available in BT 2016 and so you should be able to work with it. However there are a couple of questions:

    • It would appear you are scanning a GS1 type code of some description, but can you confirm that the barcode you are scanning includes the dashes in the date of the barcode itself or is this just in the human readable string.  If this is the data then this is not a valid GS1 symbol as the date elements are all numeric only in YYMMDD format.
    • For the serial number (AI 21) part is the string always 6 digits long? AI 21 fields can be upto 20 characters long and so if this is variable length too then that would make the parsing more difficult, unless you have some control of the original symbol and can make the (21) and data the last strings.
    • Does the data need to be broken up on the Data Entry screen or could this be handled in the label fields themselves? I.E. could the user scan the full barcode into a field and this data is then passed automatically to the label fields where it is split into it's constituent parts?  

    The screenshot below relates to the third query and does not use VB but instead truncation to discard various parts of the string and only keep the parts wanted for the strings (ie the last 6 digits for the date) . This has also assumed the scanned data does not have the brackets or dashes encoded in the actual data.



Please sign in to leave a comment.