Linking Field and Text
I hope this explanation is clear.
I have uploaded a .CSV file with two fields.
Field1 has many rows of a two letter code. Field 2 has descriptions aligned to those codes.
I'm trying to make a label where I have two text. Text 1 is going to display a part number that is going to be inputted from a QRcode. In that long part number it includes two letters from field 1. I want Text2 to show the description of the two letter code that the part number has from Field1.
I have attached an image if that helps.
-
Peter Thane
★ BarTender Hero ★
Couldn't you link the file as a database and include a filter/query that performs a lookup taking the value required from the scanned QR code?
0 -
Cperez
★ BarTender Hero ★
Sorry im new to Bartender
I linked the file as a database but how would i do a query that pefoms lookup? i dont see any conditions that say look up, would i have to do a VB script?
0 -
Peter Thane
★ BarTender Hero ★
Once you have linked the label to the database if you go databased configuration screens you should see a Filter option and you configure your query in there
0 -
Cperez
★ BarTender Hero ★
I was looking into that, but then noticed that it only lets me do values, so then I tried creating a new prompt and got lost from there. Would I have to do a VB script inside the Query Prompt and code it to say Field 1 = Field 2? or maybe code it to where it pulls field1 position = field2 same position?
I was also wondering if you knew a command to find a character in a text input from a field? For example if the text input is PT45P1A2P18 is there a command that I could code where it finds a string from field 1 in that part number that was inputted.
0 -
Peter Thane
★ BarTender Hero ★
I take it the A2 in PT45P1A2P18 is the look up value.
Is it always either the 4th and 5th characters from the end of if it were AW2 would the string be similar (ie something like PT45P1AW2P18) would the 4th - 6th characters from the end be the lookup with the QR code being one characters longer than in the other?
0 -
Cperez
★ BarTender Hero ★
Yes, that's correct; that's the arrangement of the coding for the part number. It would be better to use the 7th to 9th characters from the start, as doing so from the end could cause variations, since the length can vary. What would you suggest as the best way to code this, or is there a good command to use to extract those characters from field 1 in the QR code?
0 -
Peter Thane
★ BarTender Hero ★
So is it always characters 7 and 8 only if a two digit but 7 to 9 when three digits?
If so you could create a couple of Or database filters both of which are truncated to drop the first 6 characters to the left and then keep the next 2 characters whilst the second keeps the next three. Both filters would need to be "is any of". That seems to work correctly for my test database
0
Vous devez vous connecter pour laisser un commentaire.
Commentaires
7 commentaires