Assinging Data database fields
Hi,
I have in my label template database fields set up with a sample list. There are 4 columns (column name = field name).
In the production another service will send the label file and a generated data file to the printer server. The data file contains the same 4 columns, but unfortunately in a different order. This will lead to switched values in my 4 fields on the label.
How can i force to assign the data values of the column 1 to the field 1 even if it is not at first position anymore? The sample list and the production list contain a header line with exact the same names, just in a different order.
Thanks for a response.
-
Hello,
Welcome to the BarTender Community Forums!
If both files have headers then BarTender should automatically assign the data to the correct field since they are both labeled with the same names. Have you tested this setup? Do you receive any errors?
Thanks,
0 -
VS Engineering
★ BarTender Hero ★
Hi Krista,
I used a sample file with this data to create the .btw file:
Serial Number ProdWeek ProdYear Rev
00001 36 24 AThen i checked how the data arrive on the server where the printer service runs. It looks like this:
Serial Number ProdYear Rev ProdWeek
12345 24 A 37Unfortunately the order is different and not allways the same.
I do not get an error from the printer service or the printer itself. Just the data on the label is wrong. With this data above it prints on the label:
Field "Serial Number" = 12345, Field "ProdWeek" = 24, Field "ProdYear" = A, Field "Rev" = 37
I think it i did something wrong when setting up the database fields.
My process was Database setup -> from database file -> selected the sample file -> Data format: Tabstopp separated -> First line is a header line
May you know where to set that it assigns the fields correct?
BR Cornel0 -
pthane
★ BarTender Hero ★
My process was Database setup -> from database file -> selected the sample file -> Data format: Tabstopp separated -> First line is a header line
Try adjusting this to use
Database setup -> from database file -> DATABASE file -> Data format: Tabstop separated -> First line is a header line
These are my results using your data above with an extra "File" value added to the end of each to say whether the original or new data
0
Please sign in to leave a comment.
Comments
3 comments