Skip to main content

Search

Search

count barcode objects that have value

Comments

4 comments

  • Avatar
    Peter Thane

    I would suggest making your calculation field a VB Scripe>Event Controlled Script set to run OnPostPrompt.

    There probably is an easier way to do it, and perhaps if you know a VB programmer they can help, but if not you probably need to do something like this:

    Value = 0

    If Format.Objects("Barcode 1").Value = "" then
    Value = Value
    else Value = Value + 1
    end if

    If Format.Objects("Barcode 2").Value = "" then
    Value = Value
    else Value = Value + 1
    end if

    If Format.Objects("Barcode 3").Value = "" then
    Value = Value
    else Value = Value + 1
    end if

    If Format.Objects("Barcode 4").Value = "" then
    Value = Value
    else Value = Value + 1
    end if

    If Format.Objects("Barcode 5").Value = "" then
    Value = Value
    else Value = Value + 1
    end if

    etc....

    finishing with 

    Value = Value

     

    You can link to the Format.Objects("Barcode 1").Value from the Template Objects in the Script Assistant on the right. 

     

    For my label with 5 barcodes, 2 of which are empty then the VB value is 3 as per the below

    1
  • Avatar
    Kardo Aia

    Thank you Peter,

    I don't see OnPostPrompt 

    0
  • Avatar
    Peter Thane

    You are trying to apply it as a Document Level Script and not adjusting the label field itself and making that a VB Script>Event Controlled Script>OnPostPrompt field

    1
  • Avatar
    Kardo Aia

    Yes, that's it. This seems to work. Thank you.

    I'm self learning Bartender and still unaware of some possibilities.

    0

Please sign in to leave a comment.