List Items Property Page

The List Items property page is available for radio button, list box, and dropdown list controls. It defines the Display Text (label) that a user sees on the data entry form and the Item Value for each label, which is what prints on an item.

The Item Value that prints on an item can be the same as the Display Text, or it can be a different value that is either defined by you on the property page or specified by the Source property that you select to populate the lists.

The following sources are available:

ClosedEmbedded Data

The Embedded Data source lets you manually enter the values you want to appear in the list. To enter a new value in the list, click on a blank row and type the value you want. To delete a value, click on the row for the value you want to delete and press the Delete key on your keyboard.

The lists can be sorted in either ascending or descending order, based on either the Display Text or the Item Value lists. Simply click on the column header of the list you want to sort by.

The following option is available when you select Embedded Data as the source:

ClosedDatabase

The Database source pulls the list items from a connected database, such as a text file, Microsoft Excel spreadsheet, or other data file. After you connect to a database by using the Database Setup dialog, BarTender populates the list with the values in the specified database field.

The database connection for the list items is completely independent of the database connection that populates data on your template. Even if you have already connected to a database in your document, you need to rerun the Database Setup Wizard to connect to a new database (or the same one).

The following options are available when you select Database as the source:

ClosedExternal File

The External File source pulls the list items from a file somewhere on your computer. BarTender interprets the selected file as tab-delimited. If a line in the file contains no tab, the entire line is used to populate both the Display Text and its corresponding Item Value. If a line in the file contains two separate values separated by a tab character, the first value populates the Display Text, and the second value populates the Item Value.

The following options are available when you select External File as the source:

ClosedFile Names in Folder

The File Names in Folder source populates the list items with file names from a specified directory on your computer or network. Once you have specified a folder, you can filter the list to include only files of a certain type that are within the specified folder. For instance, in a folder with many different types of files, typing *.xlsx for the File Pattern would allow you to populate the list with only the file names for the Excel files in the specified directory.

The following options are available when you select File Names in Folder as the source:

ClosedVisual Basic Script

The Visual Basic Script source lets you write a custom VBScript to populate the list items. A carriage return (vbCr) should be used to separate multiple list items. The Script Editor, accessible from the Edit Script button, is used to write and modify your script.

ClosedExample

When writing your script, each Display Text and Item Value pair in the list is separated from the next by using a carriage return (vbCr). Within each pair, the Display Text and Item Value are separated by using a tab character (vbTab).

In the following example, you are selling three products: an orange costing $0.50, a banana costing $0.65, and a muffin costing $1.00. You want the data entry form to display three radio buttons, one for an orange, one for a banana, and one for a muffin. On the printed items, you want to print only the price. To populate the radio button list, you would type the following VBScript in the Script Editor:

Value = "Orange" + vbTab + "0.5" + vbCr + "Banana" + vbTab + "0.65" + vbCr + "Muffin" + vbTab + "1"

This will populate the list control as follows:

Display Text

Item Value

Orange

0.5

Banana

0.65

Muffin

1

If you want the Display Text and Item Value to be the same, you can type the same value for each pair or simply not include the Item Value definition, as follows:

Value = "Orange" + vbTab + "Orange" + vbCr + "Banana" + vbTab + "Banana" + vbCr + "Muffin" + vbTab + "Muffin"

OR

Value = "Orange" + vbCr + "Banana" + vbCr + "Muffin"

Either of these scripts will populate the list control as follows:

Display Text

Item Value

Orange

Orange

Banana

Banana

Muffin

Muffin

ClosedQuery Prompt Values

When you have a query prompt linked to the data entry control, the Query Prompt Values source populates the list items based on the records that match the query prompt. A query prompt is set up in the Filter view of the Database Setup dialog.

Supported Controls

This property page is available for the following controls:

Related Topics