How to Reuse Input Data When Printing Multiple BarTender Documents With Process Builder
Overview
This article provides a step-by-step guide on how to create a Process Builder file to print two different BarTender documents while reusing user-provided information between them. The guide provides instructions for use with and without a database file to supply the data.
Using the companion application Process Builder allows you to use different printers for different labels, and also configure the page size or page setup properties independently. It will also allow you to use the same data entered at print time on multiple BarTender documents.
Learn more about Process Builder using the following link: Introduction to Process Builder
Applicable to
BarTender 2019 and later
Automation edition and above
Process Builder
Information
Creating the BTW Documents
For this process, you will need to create a primary .btw file and a secondary .btw file. At print time you will specify the data from the primary file which will be shared with the secondary file using process builder.
Set Up the Labels
Below are the instructions for creating the primary and secondary .btw files.
- Create a new label.
- Create the Named Data Source that will hold the data to share with the second label.
- In the toolbox on the left-hand side, create your Named Data Sources from scratch. (Have a look at the section Create a Named Data Source From Scratch in the following article for detailed instructions: How to Create a Named Data Source)
Make sure to select Embedded Data from the Type field when creating the Named Data Sources
- In the toolbox on the left-hand side, create your Named Data Sources from scratch. (Have a look at the section Create a Named Data Source From Scratch in the following article for detailed instructions: How to Create a Named Data Source)
- Click and drag the Named Data Sources from this toolbox and drop it on the label design area.
- Save the labels
Select one of the two sections below, depending on whether you are using a database or not:
Not Using a Database
For the primary .btw file do the following:
- Create the Data Entry Form. (If you're not familiar with it, check out Data entry forms: Designing a data entry form (Video - 5:51).)
- Add your form controls (e.g.: Text Input box) and link them to the Named Data Sources. This will allow you to input the desired data.
- Save the label.
Using a Database
As mentioned previously, the setup process for the primary .btw file will differ when using a database:
- Connect to the text database. (If you're not familiar with the process, check out Getting started with database connections (Video - 5:20).)
- In the toolbox on the left-hand side, click the Data Sources tab.
- Click and drag a database field from this toolbox and drop it on the label design area. Repeat this for each database field you wish to add to the label.
- Create the Named Data Sources. Add as many as you need.
- Create the Data Entry Form. (If you're not familiar with it, check out Data entry forms: Designing a data entry form (Video - 5:51).)
- For this example, we will use a Record Picker, so that we can easily select the data record that will be used on both labels. (If you're not familiar with it, check out Configuring the record picker (Video - 6:27).)
- Add a Record Picker Object to the Data Entry Form. By default, the records from the connected database will be displayed.
- Customize various properties of the Record Picker by right-clicking it and selecting Properties.
Creating the Process Builder File
- Open Process Builder, from the BarTender Designer Tools menu.
- Click on Create New Process
- By default, a Print Document action will already be created. On the Document tab for that action, select the primary BarTender label file to print.
- If desired, you can change the name of the action in the Action tab. You can also specify the printer and number of copies on the Print Option tab.
- Add another Print Document action. Click the + icon from the left-hand side and then select the Print Document action, then click OK.
- On the Document tab, select the secondary BarTender label file to be printed.
Process Builder Setup for Use With a Database
- For the primary file's Print Document action, select the Print Options tab. Under Print Option Overrides, check the box next to Prompt for data input, so that the Data Entry Form will be available.
- Select the Named Data Sources tab, and click the box next to Copy data source values to variables at end of print job. The Prefix is optional.
- For the secondary file's Print Document action, on the Named Data Sources tab, select Specify values for Named Data Sources
- Enter the Named Data Sources used on that label with the corresponding values that will be shared from the primary label.
- Test the actions by selecting the Test tab and clicking Start.
- Save the Process Builder file.
Process Builder Setup for Use Without a Database
- For the primary file's Print Document action, select the Named Data Sources tab and click the box next to Copy data source values to variables at end of print job.
-
- The Prefix is optional; it is used to specify the prefix for the variables to which the Named Data Source values are saved. By default, these variables have the same name as the Named Data Source together with the prefix “BTDS_”. You can modify or delete the prefix.
- For the secondary file's Print Document action, on the Named Data Sources tab, select Specify values for Named Data Sources
- Enter the Named Data Sources used on that label with the corresponding values that will be shared from the primary label.
- Test the actions by selecting the Test tab, and then clicking Start.
- Save the Process Builder file.
When you double-click on the resulting file, the actions will run and both labels will be printed. You can also execute the Process Builder file from Print Station.