Skip to main content

Search

Search

Multiply two data sources for one barcode?

Comments

4 comments

  • Avatar
    Peter Thane

    Depending on when your data is being populated may effect the best way to achieve this, for exampe if it comes from a Database then you will need to make the VB an Event Controlled Script and use the OnNewRecord option or if it is entered on a Data Entry Form you will need to use OnPostPrompt. The code below works although I have set it as a Multiline Routine as I am using fixed fields:

     

    I have used the Transforms tab to control the number of characters in the 2nd substring and pad with leading zeroes where appropriate. 

    I hope this helps

     

    1
  • Avatar
    Jose Adam Flores Sr.

    This an interesting subject to watch for the end result.

    UPC-A is probably not the best Barcode to use in this case.

    The UPC-a symbology uses Numbers (integer) but Multiplying the weight x price per pound

    it's going to yield fractions and somehow it will have to be converted to round numbers and you will have a limit of 5

    digits.

    mainly the UPC-A barcode it's designed to identify unique products and multiplying the NetWeight x PricePerPound

    will not identify a unique product.

    you should probably try using a Code-128 or Code-39 

    in which you will be able to use the calculated values as data source, since those symbologies

    support a combination of ASCII characters.

    I seem to recall that Seagull Scientific provides Sample formats the can be used with a weight scale

    that will allow you to either enter the weight and price to let you print a label like in the Butcher Label.

    It might be worth looking into it.

    Regards 

    0
  • Avatar
    Teresa Nguyen

    Thank you, this helps a lot!

    Would it be possible to add decimal places without the decimal in the UPC-A? 

    For example 22*1.23 = 27.06

    12345602706[CD]

    0
  • Avatar
    Peter Thane

    Yes, adjust the Character Filter to Numeric only

    0

Please sign in to leave a comment.