
Configuring Data Sources
Note: While the JavaScript environment provides some functionality similar to the Formula data source, the
syntax is not exactly the same.
Accessing a Label Field
In order to specify or change the value or properties of a label field, you must be able to access the
field.The following syntax is used to access the desired fields and properties on a label:
label.fields.field.(@name == 'xxxxxxxx').@posLeft = 3.0;
where 'xxxxxxxx' is the name of the field on which the script will be applied. Field, font, and barcode
properties must be preceded by the at sign (@), as shown in the example above. This script will set the
left position of the label field 'xxxxxxxx' to 3 inches.
There are field, font, and barcode properties that can be accessed and modified, and there are also field,
font, and barcode properties that can be accessed but not modified.
Note: Case and punctuation are significant.Keywords must be lower case. The use of parentheses, quotation
marks, and semicolons is governed by the ECMAScript specification.
Keywords
The following keywords are used to access the label fields. Keywords must be lower case and use the dot
notation as shown in the examples provided below.
l label
l fields
l field
l font
l barcode
Field Properties
Field properties must be preceded by the at sign (@).
The following is a list of the available field properties and corresponding values.These are the properties
that can be modified by the script:
Field properties that can be modified by the script
data String value enclosed with quotation marks (“my data”)
posLeft Floating point value
posTop Floating point value
padding
“none”, “leadingZeros”, “leadingSpaces”, trailingSpaces”,
“centerWithSpaces”
rotation “0”, “90”, “180”, “270”
Loftware Label Manager Version 10.1.1 User's Guide
296
Comentarios a estos manuales