Scan QR to choose record
I want to scan a QR with, among other data, article number and from that number pick up data from database to print on label. To get the article number from the QR is not the problem, but how to get the correct record is the challenge.
I have read this post, but it does not solve it for me.
Would be grateful for help!
-
Peter Thane
★ BarTender Hero ★
I take it the data you need to use to perform the look up is not the whole barcode number and is just part of the QR code. If that is the case is there anyway this data can be readily distinguished? For example, is it always the same part of the code, ie the first X digits or always digits X to Y (eg 10th to 15th) of the code or does it appear after a specific pattern in the code etc?
0 -
Per-Axel Jonsson
★ BarTender Hero ★
I have a script to get the information from the scanned QR code. But how to go from the script to choose the record is the tricky part. In the post I linked to is this /?<query prompt name>="<query prompt value>" mentioned, but I have not been able to get it to work, so any tips how to implement it would be helpfull.
0 -
Peter Thane
★ BarTender Hero ★
The database lookup is normally performed before the scripts, have you tried adding the VB to the database filter so it gets applied when the code is scanned into the record selector input box?
0 -
Per-Axel Jonsson
★ BarTender Hero ★
Yes, this kind of solved the problem, thanks for the help.
I did not mention that the QR also contained a serial number that should be printed. Instead of using filter I made a VB-script in the query prompt looking like this.
Format.NamedSubStrings("serialno").Value = Mid(Value, 3, 6)
Value = Left(Value, 2)0
Please sign in to leave a comment.
Comments
4 comments