User guide
96
Label Studio User’s Guide
Expressions and filters
When you drop certain objects onto your layout, you may need to create a value
expression or conditional filter for that object. Label Toolbox provides a utility
for creating and editing your filters and expressions.
To access this utility, select the object and choose Format > Properties from
the Label Toolbox menubar. Click the Filter Browser button.
Value expressions A value expression tells Label Toolbox to print the value of the specified field or
data. For example, PW, AP, and DB fields automatically contain a value
expression telling Label Toolbox to print the specified information.
When Label Toolbox looks at a record, it retrieves the data for this value
expression and applies it to the record. For example, a value expression,
alltrim(ap.adr_bc_dgt) + alltrim(ap.adr_chk_digit), would return the value of
ap.adr_bc_dgt + ap.adr_chk_digit for each record.
Barcodes always require a value expression.
Conditional filter A conditional filter allows you to designate under what conditions an element of
your label or the data contained in the element will appear or not appear.
For example, a conditional filter, alltrim(pw.mail_type) = “ATM”, would return
a “T” or “F” for each record depending on the outcome of this function.
Objects that do not have a conditional filter assigned to them will always print.
Predefined
expressions and
filters
Label Toolbox provides predefined expressions and filters. These cover some of
the most fundamental expressions for the various elements of your mailing.
Filter Description Usage
AP.Adr_BC_Dgt
PW.Adr_BC_Dgt
Value expression for address label barcodes Used by the POSTNET barcode
in labels (not container labels)
AP.Ctn_BC_Dgt
PW.Ctn_BC_Dgt
Value expression for container label barcodes Used by container labels
Ctn BC Required Conditional filter for container label barcodes
Last in Pkg Conditional filter indicating the label as the last in a package Used only on presorted labels
First or Last in Pkg Conditional filter indicating the label as the first or last in a package Used only on presorted labels
Last in Ctn Conditional filter indicating the label as the last in the container Used only on presorted labels
First or Last in Ctn Conditional filter indicating the label as the first or last in a con-
tainer
Used only on presorted labels
Last in Plt Conditional filter indicating the label as the last in a pallet Used only on presorted labels
First or Last in Plt Conditional filter indicating the label as the first or last in a pallet Used only on presorted labels
BC on ATM only Conditional filter indicating the label should have a barcode if it is
of the mail type, ATM
Letter D Value expression defined as letter “D”