Product: LABELVIEW, CODESOFT
Version: All Versions
|
About Data Sources and Variables
What is a data source?
A data source is a location from which a specific piece of data is extracted to populate a variable field on a label. A data source can be of internal or external origin:
- Internal data sources include counters, formulas, and date/time stamps (such as from a system clock).
- External data sources include databases, and direct keyboard input (such as for forms).
What is a variable?
A variable is a component, the value of which advances as printing takes place. Its value is linked to a data source. The variable is populated by that data source based on various factors such as predefined entries, formats, and increments. For example, a date variable can be defined such that it contains the current day, date and time. The content of the field is variable because it will change depending on when the labels are sent to the printer. The information in the field is derived from the computer clock or from the printer. Another example is a counter variable. A counter variable can be defined such that its value increments with each label printed.
Why use variables?
Variables allow you to include information on a label that may change. By associating the content of the field with a data source, it can be filled in or updated automatically (or by way of user input) at the time of printing. In addition, variables allow you to include unique information on each label. For example, a counter variable allows you to print a different serial number on each label.
What is a variable object?
A variable object is a variable that is added to a document as a physical object: text, bar code or image. The value of the variable is either displayed in the form of text or encoded in a bar code. A single variable can be associated with more than one object.
Types of variables
LABELVIEW/CODESOFT supports these types of variables:
- Database variables are populated by data from database queries or ASCII tables.
- Date variables are populated by data from the computer clock or from the printer clock. You define the format and content of the date variable; for example, month-day-year or day-month-year, and whether a time of day is also included.
- Formulas or linked expressions are populated by the results of operators, constants, variables, control variables, formulas and functions. Data can be numeric or alphanumeric.
- Form variables are populated by data that a user inputs at the time of printing. The form can be defined to prompt the user for a specific entry, to provide lists of predefined entries from which the user can select, or to allow free-form entries.
- Table lookup variables are populated by the result of searches carried out in databases other than those linked to the current document. Searches are carried out in one or more database fields.
- Data is then extracted from one of the record fields found; that is, the “result field.”
- Counter variables are populated by data calculated either by the computer, or by your printer. The content of the variable changes as printing advances, according to an initial value and an increment value that you define.
- Free variables are similar to form variables in that they are populated by data that is not defined at the time the variable is created.
Managing Variables
Data sources window
The Data sources window displays the data sources from which you can create variables. Variables that you create appear under the data source to which they belong.
NOTE: You can show or hide the Data sources window by clicking View > Data sources.
Using the Data sources window
- You can expand or hide the display of variables associated with each data source by clicking the triangle to the left of a particular data source type in the Data sources window.
- You add a variable by right-clicking a data source and selecting Add from the displayed context menu.
- You access the properties of a variable by:
- Right-clicking the variable in the Data sources window, and selecting Properties, or by double-clicking the variable in the Data sources window.
- You place a variable in a document by dragging it from the Data sources window into the document, and then choosing to display it as text, a bar code or an image.
- You delete a variable by right-clicking a variable and selecting Delete from the displayed context menu.
Creating Shared Variables
What is a shared variable?
A shared variable is a variable value that is saved in a special file, external to the document, each time after printing. This value may then be used by other documents. You can share variable values for Counter, When Printed, Advanced, or List variables.
If you want to use a variable in other documents, you must click the Shared option when setting up the variable's properties as shown below and reference the same Variable name
or create a new shared variable from the Shared Data Sources Management dialog box, by selecting which type of shared variable you'd like to create from Tools > Shared data sources management.
To create a new shared variable from the Shared Data Sources Management dialog box:
1. On the Tools menu, click Shared Data Sources Management and then select either; Counter, When Printed, List, or Advanced variable type.
The Shared Data Sources Management dialog box appears.
2. Click the + icon insert a new variable.
3. Type a variable name in the left column, and then type its value in the right column.
4. Repeat the operation as many times as necessary.
5. Click OK.
|