What Triggers A Vbscript? Follow


Here a my steps:

Print Label

Opens Data Entry Template

Scan 5 barcodes into 5 different Text Input Control Boxes.

Each box is linked to a Named Data Source (NDSScan01 through 05) that gets filled with data that looks like this:


Label has 5 non-printing Text Boxes that are linked to the same NDSScan01 through 05

Attached to the 5th non-printing Text Box is a VBScript that Splits the NDScan01-05 data and puts the Serial Number into another Named Data Source

BarCodeArray = Split(Format.NamedSubStrings("NDSScan01").Value, ",")
Format.NamedSubStrings("NDSSerial01").Value = BarCodeArray(2)
BarCodeArray = Split(Format.NamedSubStrings("NDSScan02").Value, ",")
Format.NamedSubStrings("NDSSerial02").Value = BarCodeArray(2)
BarCodeArray = Split(Format.NamedSubStrings("NDSScan03").Value, ",")
Format.NamedSubStrings("NDSSerial03").Value = BarCodeArray(2)
BarCodeArray = Split(Format.NamedSubStrings("NDSScan04").Value, ",")
Format.NamedSubStrings("NDSSerial04").Value = BarCodeArray(2)
BarCodeArray = Split(Format.NamedSubStrings("NDSScan05").Value, ",")
Format.NamedSubStrings("NDSSerial05").Value = BarCodeArray(2)

Click Print again on the Data Entry Template

NDSSerial01 through 04 are then printed in a human readable text and a Code39.

I had to add the 5th non-printing Text Box to assure that the first 4 update.


Here's the Question:  NDSSerial05 does not update so where can I attach the VBScript so that all NDSSerial Data Sources are updated.


Label Attached.  Bartender V10.0.  (In 10.1, would would just use a Character Template to filter the Serial Number as it is always in the same format)


Legacy Poster
Comment actions Permalink

From a chat session:

That may be the problem. I'd try putting it to a separate object
and set it to 'OnPostPrompt', it may just be a timing issue, it populates
before NDSScan05 is populated.

What you'll want to do is to create a new text
object, put it off the label, then set the source to VB Script.

Set the script type to 'Event Control Scripts', then
go into the editor, you can select when you want the script to fire off.


VBScripts that are set as part of the Data Source Properties for a TYPE like Embedded Data, fire on entry to the Text Box they are attached to.

When a Data Source TYPE is set to VBScript and the SCRIPT TYPE is set to EVENT CONTROL SCRIPT, then you have a list of choices of when to fire the script.

Domingo Rodriguez
Comment actions Permalink


Does it mean that your question is solved now and you're up and running, or do you require further help?

Please sign in to leave a comment.