Extract Query Prompt From Serial Number
I am trying to create a label that fills in information from a database that contains product information (color, dimensions, etc). I can filter this database reliably down to a single record based on a three-digit "product code" in the middle of serial number generated upstream in the manufacturing process.
I have a user form where the operator scans the serial number, and manually enters other data that appears on the label. Since the SN appears on the label, the text box where it is scanned in is already linked to the label element, and I can't hijack that field for the query prompt directly.
Since the serial number is already being scanned in, I would like to update the query prompt from that field without requiring the operator to separately enter (and look up) the product code. I just can't figure out where and how to update the query prompt programmatically based on the serial number field being populated.
I've also tried just using a static filter based on a named data source, but I can't get the filter to apply at print time, so printing creates labels for every record in the database.
Any help pointing in the right direction is greatly appreciated.
-
Peter Thane
★ BarTender Hero ★
I think you are doing it backwards.
Link the scanned input to the database lookup/filter, apply the transforms etc to that. to just get the part you need, and leave the serial number field on the label to extract the value from the database itself.
The database filter will be applied before the Named Data Source field has a value I believe and so that could be the issue.
0 -
Brandt Clawson
★ BarTender Hero ★
Thanks for the suggestion Peter, that is the issue I'm running into as I try to use the named data source as a database filter: the filter doesn't apply without refreshing the database, unlike when we use a query prompt, which seems to apply the filter immediately.
To make sure I understand your suggestion, you're recommending linking the scanned data to a query prompt and transforming to extract my product code, then the serial number field on the label is rebuilt solely from database information? I like that idea, but unfortunately the database is static. No individual product information is written to the database, so I don't have any way to reverse engineer the serialized portion reliably.
0 -
Peter Thane
★ BarTender Hero ★
If the serial number is already in the database then why do you need to revers engineer it? All you would be doing is scanning a barcode (of the serial number) via Transforms you can automatically strip off the bits you dont need and then BarTender will can be set to look in the Product Code field for the number extracted from the scanned data.
Completely separate to the database filter a field on the label is linked to serial number and will printer value of the product code selected in the database.
0 -
Brandt Clawson
★ BarTender Hero ★
Sorry, I maybe haven't been clear, but the serial number is not in the database, and is only presented to the operator on the label being scanned. The serial number includes some information from the product database, but also includes a serialized portion that is not recorded until a few steps after this label is created.
0 -
Peter Thane
★ BarTender Hero ★
Ok. What edition and version are you using?
0 -
Brandt Clawson
★ BarTender Hero ★
I'm running 2022, R5 with an Enterprise edition license.
0
Please sign in to leave a comment.
Comments
6 comments