Script before Data Matrix processing.
Hi,
I am trying to use VB script (Transform - VB Script) to populate the GTIN field for use in Data Matrix - AI (01).
Data sources:
GTIN (stored in object Value GTIN)
GTINRight (stored in object Value GTINRIght)
Depending on the xml file and which data source is populated I want that data source to be the data value for the Data Matrix. The data matrix is built to fetch objectvalue from the object Value GTINRight and as long there's value there the label prints as it should. But if GTINRight is empty and GTIN is populated I want GTINRight = GTIN before Data Matrix print. Whatever I do the printer results in GTINRight Not enough digits for GTN-14.
Following script runs fine during editing and test run but upon printing it does not.
If (Format.NamedSubStrings("GTINLeft").Value ="") then
Format.NamedSubStrings("GTINLeft").Value = Format.NamedSubStrings("GTIN").Value
end if
Not sure if this is the right way to do it.
Maybe there's a way to run script before Data Matrix is called?
Or is there a way to print the label even if the data matrix is invalid?
I have also tried a different path by creating 2 different layers, one Data Matrix with GTINRight and the other Data Matrix with GTIN.
Then set Layer to print only if GTINRight is not empty and same for the other.
Still the layer will try to process data matrix code for that "disabled" layer.
-
I would adjust the field to be a full Visual Basic field that processed On New Record as an Event Controlled Script to make sure that the data is actually present for your to reference
0 -
Thanks again, I will solve it through our ERP instead. Didn't want to slow down Bartender with too many scripts/coding.
0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
2 Kommentare