Populating more than one variable from a single selection
I need a dropdown list in a selection box to populate several other parts of the template, from a table.
Selecting a key field makes all the other fields change in line with a row in a table.
-
pthane
★ BarTender Hero ★
It sounds like you need to link your label upto your table via the database connection setup interface creating a filter/query to your selection criteria field
0 -
Michael Fricker
★ BarTender Hero ★
Hi Peter,
I have tried to achieve this in so many ways, let me start by explaining what I want to do so it's clear then I will describe my approach (not all of them).
So I have a list of values I want to present on a form at print time, this needs to populate a template with the relevant fields, lets assume I have 3 data items I want to populate in the label for now.
I have an excel file that has the following columns. [Label_Name], [Paint_Colour], [Paint_Colour_Code], [Barcode_Data]
I am trying to use the [Label_Name] in the dataset, being selected using a radio button to populate the correct data for the label, there are about 10 rows.
I have used the dataset to allow me to manage my form, with a value displayed being different to the selection value - so far so good.
Then in my label I use the same dataset assigning each element a named data source fed from my dataset(XLSX).
The problem comes when I try printing, I get pretty strange results, with only some values being displayed, and the data not changing to reflect the form seletion...
I have tried creating a list and concatenating all the fields together, sub-stringing out the different elements in bartender, that fails too...
I'm stuck how to best approach the issue.
Also why do I have to load a new dataset to populate the form list, why cant I use the one I have already loaded for the Form?
Help.... lol
0 -
pthane
★ BarTender Hero ★
So, if I understand correctly, at print time you select the Label Name which pulls from your database all the data that matches that Label Name and then you want to print all the multiple records on the same label?
If so you would need to set your Label Name as the database filter and then use the Records per Item to say how many records (maximum) will be shown on the same label. If an item has less than the maximum then the other fields will be empty (see below)
Record 100 just has 2 matching records so would look like this
0 -
Michael Fricker
★ BarTender Hero ★
Hi Peter,
No I don't want additional records, and I feel like this should be easy, sorry for my confusion, I will have another go at explaining:
I want to use an XLSX like this:
Select prints in a form using the Names column like this:
I am using the Colour_Code as my value:
I want the form selection to populate my label with the row information, something like this:
I get lots of strange results from but mainly it's the data isn't from a single row, how do I ensure all the data is from the single selected row.
Is it something to do with the record selection in the print dialogue?
0 -
pthane
★ BarTender Hero ★
Okay, that makes it clearer and this should be fairly simple to configure from where it looks like the label is designed at the moment.
- On the File>Print screen set the Queried records value to All
- In the Database Connection Setup screens configure a Filter/query to look at the Colour_Code column, leave the type as Equals and select New Query Prompt from the drop down and make a note of the name of the Query Prompt as you can change this is you require. Ignore the Text Label as you wont see this anyway as the query prompt will be connected to the Data Entry form.
- On the Data Entry Form, go in to the Properties of your Radio Button list and make sure the Linked Data Source is connected to your Query Prompt name from 2 above.
Hopefully that should be all you need to do.
0
Please sign in to leave a comment.
Comments
5 comments