Sunteți pe pagina 1din 41

Combining Fields

Pgina 1 de 41

Combining Fields
To combine two or more fields into one field
1. Ensure that each source field that you will be using in the combined field has a unique field name,
set on the Options tab. The source fields can be set up as hidden, or may be printed or linked to
other fields.
2. Add a new field, which will be the combined field, and set the Data Source to Linked.
3. For the Linked Fields setting, type the names of the source fields in the order you want them to
appear. Alternatively, you can select the source field names by clicking the Linked Fields droplist and selecting each field in turn.
4. Add a plus (+) sign between each field in the linked field expression.
5. If you want to put a space between each field (e.g., you want JohnSmith to be John Smith), place
+" "+ between the two fields (include the "").
6. Click OK and add the field to a blank area on the label.
Note: In a linked expression, data typed within quotation marks is printed exactly as typed. Data written
without quotes is treated as a field name or function.
View combined field examples...

Linked Expressions
The Linked data source allows you to populate a field based on:

A link to another field on the label that contains the value

A field created by combining two or more fields on the label

The result of a logical, mathematical or other type of calculation that may or may not be based on
the values of other fields in the label

For example, you could create a bar code containing several different pieces of information (e.g., date,
serial number, and part number), all linked into the bar code from separate fields.
Note: When adding fields to your label it is good practice to give each field a unique name (using the
Field Name setting on the Options tab) so that you can easily distinguish it from other fields and use it in
an expression if necessary.

Functions for Building Linked Expressions

file:///C:/Users/SOPORTE-1/AppData/Local/Temp/~hh4A99.htm

27/06/2015

Combining Fields

Pgina 2 de 41

There are many types of functions that can be used to build a linked expression:
Functions used to manipulate a field or format characters
Functions used to perform mathematical operations
Functions used to perform logical operations
Functions used to perform check digit calculations
Functions for date and time fields

View an alphabetical listing of ALL linked functions...

Linked Functions Used to Manipulate Fields


The following linked functions allow you to manipulate a field by formatting its characters, extracting
characters, converting to a different currency, etc.
Note: In a linked expression, data typed within quotation marks is printed exactly as typed. Data written
without quotes is treated as a field name or function.
The following categories of functions allow you to manipulate a field:
String Functions
Numeric/Currency Functions
Other Functions

View an alphabetical listing of ALL functions used to manipulate fields...

String Functions
ASCII()= This function will output the ASCII character code number for the first character in the field.
Usage: ASCII(value)
value = Any alphanumeric string enclosed within quotes " ", or the name of a field already on the label.

file:///C:/Users/SOPORTE-1/AppData/Local/Temp/~hh4A99.htm

27/06/2015

Combining Fields

Pgina 3 de 41

Examples:
If a field on the label is named FIRST and is equal to "Hello", and another field named SECOND is
equal to "hello", then...
ASCII(FIRST) would produce 72
ASCII(SECOND) would produce 104

ASCII("Bob") would produce 66


ASCII("123")

would produce 49

CHR () = This function will allow a character from the ASCII code chart to be inserted into a field.
Enter the ASCII character code number within the parentheses. There are also special ASCII commands
(for the values from 00 to 31) that have additional functions which can be called by enclosing that
function within angle brackets < > (e.g., <STX>).
Usage: CHR(n)
n = A number between 0 and 255, selected according to an ASCII code chart.

Examples:
CHR(13) would produce a carriage return at the desired location (e.g., at the end of a bar code).
<CR> would also produce a carriage return.

CONCAT()= This function is used to combine two fields on the label into a single field.
Usage: CONCAT(string1,string2)
string1,string2 = Character strings enclosed within quotes " ", or the names of other fields already on the
label.

file:///C:/Users/SOPORTE-1/AppData/Local/Temp/~hh4A99.htm

27/06/2015

Combining Fields

Pgina 4 de 41

Examples:
If string1 is named FIRST and has a value of FOUR, and string2 is named SECOND and has a value of
SEASONS, then...
CONCAT(FIRST,SECOND) would produce FOURSEASONS

CONCAT("Hello","There") would produce HelloThere

CR () = This function inserts a carriage return at the specified location.


Usage: CR()
Examples:
"123ABC"+CR() would add a carriage return to the end of the string "123ABC".
This has the same effect as using the CHR(13) command.

CYCLECHAR () = Creates a custom sequence of characters to cycle through.


Usage: CYCLECHAR("first_character","last_character",increment,copies)
first_character = The character printed on the first label in the series.
last_character = The last character in the cycle before starting over.
increment = (Optional) The value to increment each character by. If not included, then '1' is used, unless
the first character is larger than the last, in which case '-1' will be used. Negative numbers will count
down.
copies = (Optional) Specify the number of copies of each character to print before incrementing to the
next value. The default value is '1'.

Examples:
CYCLECHAR("A","C") would produce labels sequenced A B C A B C A B C....

file:///C:/Users/SOPORTE-1/AppData/Local/Temp/~hh4A99.htm

27/06/2015

Combining Fields

Pgina 5 de 41

CYCLECHAR("A","C",1,2) would produce labels sequenced A A B B C C A A B B...

CYCLESTRING () = This function allows you to create a group of words or characters which will be
cycled through like an incrementing field. The entire string must be enclosed within the quotes (" "), and
each word or set of characters must be separated from the others by a semi-colon (;).
Usage: CYCLESTRING("word_list")
word_list = The series of words or characters to cycle through.

Examples:
CYCLESTRING("Mon;Tue;Wed;Thu;Fri;Sat;Sun") would produce a sequence Mon Tue Wed Thu
Fri Sat Sun

The following example is for printing shelf labels using all letters in the alphabet except O and I.
CYCLESTRING("A;B;C;D;E;F;G;H;J;K;L;M;N;P;Q;R;S;T;U;V;W;X;Y;Z")

FIND() = This function returns the starting position of a character or string in another field.
Usage: FIND(string,key,start)
string = A string of characters enclosed within quotes " ", or the name of a field already on the label.
key = This identifies what you are looking for within the stated string. It can be either a field name, or
the specific data to be found enclosed within quotes " ".
start = This allows you to specify the point within the string at which to start looking for the key. It
should be a number, or the name of another field on the label containing this value. Counting is done
from left to right, with the first character in the string being 1.

Examples:
If the field STRING contains the data "ABCDEFGHIJK", then...

file:///C:/Users/SOPORTE-1/AppData/Local/Temp/~hh4A99.htm

27/06/2015

Combining Fields

Pgina 6 de 41

FIND(STRING,"G",1) would produce 7 (G is the seventh character)


FIND(STRING,"G",3) would produce 5 (G is the fifth character after the 3rd position)

LEFT() = This function will extract the left-most number of characters specified in the named string.
Usage: LEFT(string,length)
string = A string of characters enclosed within quotes " ", or the name of a field already on the label.
length = The number of characters to extract from the string, or the name of a numeric field already on
the label.

Examples:
If the field COMPANY contains the data "ABC Company", then...
LEFT(COMPANY,3) would produce ABC

LEFT("Hello There",5) would produce Hello

LEN () = This function will return the length of the specified field or string.
Usage: LEN(string)
string = A string of characters enclosed within quotes " ", or the name of a field already on the label.

Examples:
If a field named PRICE had a value of 1234, then...
LEN(PRICE) would produce 4

LEN("Hello") would produce 5

file:///C:/Users/SOPORTE-1/AppData/Local/Temp/~hh4A99.htm

27/06/2015

Combining Fields

Pgina 7 de 41

LEN(01) would produce 2

LOWER() = Use this function to convert the specified string all to lowercase characters.
Usage: LOWER(string)
string = A string of characters enclosed within quotes " ", or the name of a field already on the label.

Examples:
If a field named COMPANY has a value of LMNOP, then...
LOWER(COMPANY) would produce lmnop

LOWER("XYZ Sales") would produce xyz sales

MID() = This function will extract any segment of a field. Use it to break apart a field into useable
chunks.
Usage: MID(field_name,start_pos,numb_chars)
field_name = The name of the field you want to break apart.
start_pos = The number of the character you want to start extracting from counting from the left side of
the field.
numb_chars = The number of characters that you want to extract. Include the start position and count to
the right.

Examples:
If a field named EMPLOYEE has a value of WENDEL CLARK, then...
MID(EMPLOYEE,1,6) would produce WENDEL
MID(EMPLOYEE,8,5) would produce CLARK

file:///C:/Users/SOPORTE-1/AppData/Local/Temp/~hh4A99.htm

27/06/2015

Combining Fields

Pgina 8 de 41

MID(EMPLOYEE,3,1) would produce N

OUTPUT() = This function will repeat the named field or string.


Usage: OUTPUT(string)
string = A string of characters enclosed within quotes " ", or the name of a field already on the label.

PAD () = This function will add characters on the left side of a field to make the entire entry a
predetermined length. Any character can be selected to be the padding character.
Usage: PAD(number,length,pad_character)
number = The actual value (within double quotes ( " ) if it is a text string), or the name of the field to be
used.
length = The length the final field is to have.
pad_character = (Optional) Specify the character to use to pad the field. The default is '0' if nothing is
specified.

Examples:
If a field named GREETING had a value of HELLO, then...
PAD(GREETING,8) would produce 000HELLO

PAD(5,3) would produce 005


PAD("Nine",6,a) would produce aaNine

REPLACE() = This function will remove the specified number of characters from the string and replace
them with another set of characters.

file:///C:/Users/SOPORTE-1/AppData/Local/Temp/~hh4A99.htm

27/06/2015

Combining Fields

Pgina 9 de 41

Usage: REPLACE(string,start_num,num_chars,replace_with)
string = A string of characters enclosed within quotes " ", or the name of a field already on the label.
start_num = The position within the string at which to start removing characters, counting the left-most
character at 1.
num_chars = The number of characters to remove from the string, starting at start_num.
replace_with = The new characters to replace the removed characters.

Examples:
If a field named COMPANY has a value of ABC Flower Shop and a field named NEW has a value of
Hardware, then...
REPLACE(COMPANY,1,3,"Bobs") would produce Bobs Flower Shop
REPLACE(COMPANY,5,6,NEW) would produce ABC Hardware Shop

REPT() = The Repeat function allows you to specify a string of characters to repeat and the number of
times to repeat the string.
Usage: REPT(string,num_repeats)
string = A string of characters enclosed within quotes " ", or the name of a field already on the label.
num_repeats = Specify the number of times the string is to repeat across the label

Examples:
If a field named FIRST has a value of ABC then...
REPT(FIRST,5) would produce ABCABCABCABCABC

REPT("Hello",3) would produce HelloHelloHello

file:///C:/Users/SOPORTE-1/AppData/Local/Temp/~hh4A99.htm

27/06/2015

Combining Fields

Pgina 10 de 41

RIGHT () = This function extracts characters from the right side of the named field. The result is the
extracted character or characters.
Usage: RIGHT(field_name,number_of_chars)
field_name = The name of the field from which you want to extract the characters.
number_of_chars = The number of characters to extract.

Examples:
If a field named EMPLOYEE has a value of WENDEL CLARK, then...
RIGHT(EMPLOYEE,5) would produce CLARK
RIGHT(EMPLOYEE,1) would produce K

SEARCH() = This function will output the numeric position of the first occurrence of a specified
character or group within a string. The search is not case sensitive; capital letters and lowercase letters
are treated the same. If the searched for target does not appear, the result will be zero ( 0 ).
Usage: SEARCH(string,find_what,start_pos)
string = A string of characters enclosed within quotes " ", or the name of a field already on the label.
find_what = Enter the character, string, or field name containing the data you want to find.
start_pos = Specify at which point within string you wish to start the search.

Examples:
If a field named COMPANY has a value of "Monumental Record Company", and a field named
LETTER has a value of "m", then...
SEARCH(COMPANY,LETTER,1) would produce 1
SEARCH(COMPANY,LETTER,2) would produce 4

SEARCH("Hello There","o",5) would produce 1

file:///C:/Users/SOPORTE-1/AppData/Local/Temp/~hh4A99.htm

27/06/2015

Combining Fields

Pgina 11 de 41

SUBSTR () = The Substring function will extract any segment of a field. The result is the extracted
character or characters.
Usage: SUBSTR(field_name,start_pos,numb_chars)
field_name = The name of the field from which you want to extract the characters.
start_pos = The number of the character you want to start extracting from, counting from the left end of
the field. If the starting character is beyond the end of the named field, only a space is printed.
numb_chars = The number of characters to extract. Include the start position and count to the right. If
the specified length takes it beyond the end of the field, the extra characters are ignored.

Examples:
If a field named EMPLOYEE has a value of WENDEL CLARK, then...
SUBSTR(EMPLOYEE,1,6) would produce WENDEL
SUBSTR(EMPLOYEE,8,5) would produce CLARK
SUBSTR(EMPLOYEE,3,1) would produce N
SUBSTR(EMPLOYEE,20,4) would produce (a space)

SUBSTR("Hello",4,5) would produce lo

TEXT() = Use this function to format a specified string or field according to the given format.
Usage: TEXT(string,format)
string = A string of characters enclosed within quotes " ", or the name of a field already on the label.
format = The format, enclosed within quotes, to use for the string.

Examples:

file:///C:/Users/SOPORTE-1/AppData/Local/Temp/~hh4A99.htm

27/06/2015

Combining Fields

Pgina 12 de 41

TEXT(012345678,"###-##-####") would produce 012-34-5678


TEXT(2125551212,"(###)###-####") would produce (212)555-1212

TRIM() = Use this function to remove all of the spaces from a specified string or field.
Usage: TRIM(string)
string = A string of characters enclosed within quotes " ", or the name of a field already on the label.

Examples:
If a field named FIRST has a value of "Believe it or not", then...
TRIM(FIRST) would produce Believeitornot

TRIM("Now is the time") would produce Nowisthetime

UPPER() = Use this function to convert all of the specified string to uppercase letters.
Usage: UPPER(string)
string = A string of characters enclosed within quotes " ", or the name of a field already on the label.

Examples:
If a field named COMPANY has a value of "lmnop", then...
UPPER(COMPANY) would produce LMNOP

UPPER("XYZ Sales") would produce XYZ SALES

file:///C:/Users/SOPORTE-1/AppData/Local/Temp/~hh4A99.htm

27/06/2015

Combining Fields

Pgina 13 de 41

VALUE() = This function converts a string from a character data type to a numeric data type. In most
applications, it will simply repeat the entered value. Key fields in databases must be set as character,
even if they are numeric. This function will convert the value on the label into a numeric data type for
other uses (e.g., UPC bar codes only allow numbers).
Usage: VALUE(string)
string = A string of characters enclosed within quotes " ", or the name of a field already on the label.

Numeric/Currency Functions
CONVERTBASE10_TO_BASEX() = This linked function is used to convert numbers from Base 10 to
any base numbering system. The label designer must define the base X numbering system within the
linked expression, and then the Base 10 number to convert to the new base. Both the base X definition
field and the Base 10 value can be linked to other fields on the label, but field names must not appear in
quotes.
Usage: CONVERTBASE10_TO_BASEX (baseX_string ,base10_number_to_convert)
baseX_string = Gives all of the digits in the numbering system in order. For example, the common Base
10 numbering system would be written as "0123456789".
base10_number_to_convert = Enter the value of the number in Base 10 that you want to convert into
base X. If the value entered is too large, the program will return an 1853 error. Acceptable values
depend upon the baseX_string and the number_to_convert.

Examples:
If a field named Base16 contains the string 0123456789ABCDEF, then...
CONVERTBASE10_TO_BASEX(Base16,12) would produce C
CONVERTBASE10_TO_BASEX (Base16,10) would produce A

CONVERTBASE10_TO_BASEX ("012345",9) would produce 13

CONVERTBASEX_TO_BASE10() = This linked function is used to convert numbers from any base
numbering system into standard Base 10. The label designer must define the base X numbering system
within the linked expression, and then the base X number to convert into Base 10. Both the base X
definition field and the base X value can be linked to other fields on the label, but field names must not
appear in quotes.

file:///C:/Users/SOPORTE-1/AppData/Local/Temp/~hh4A99.htm

27/06/2015

Combining Fields

Pgina 14 de 41

Usage: CONVERTBASEX_TO_BASE10 (baseX_string,baseX_number_to_convert)


baseX_string = Gives all of the digits in the numbering system in order. For example, the common Base
10 numbering system would be written as "0123456789".
baseX_number_to_convert = Enter the value of the number in base X that you want to convert into
standard Base 10 number system. This value must appear in quotation marks " ". If the value entered is
too large, the program will return an 1853 error. Acceptable values depend upon the baseX_string and
the number_to_convert.

Examples:
If a field named Base16 contains the string 0123456789ABCDEF, then...
CONVERTBASEX_TO_BASE10(Base16,"E") would produce 14
CONVERTBASEX_TO_BASE10 (Base16,"10") would produce 16

CONVERTBASEX_TO_BASE10 ("012345","23") would produce 15

CURRENCYTOEURO / EUROTOCURRENCY() = This function is used to convert a value in one


currency to and from the EURO. The rate of exchange must first be set from the Configuration dialog's
General tab.
Usage: CURRENCYTOEURO(amount) -OR- EUROTOCURRENCY(amount)
amount = This is the value of the currency to be exchanged to or from the Euro.

Examples:
If AMOUNT1 has a value of 55.99 units, and the Euro conversion rate is 1.5, then...
CURRENCYTOEURO(AMOUNT1) would produce 37.33

(55.99/1.5)

EUROTOCURRENCY(AMOUNT1) would produce 83.98

(55.99x1.5)

file:///C:/Users/SOPORTE-1/AppData/Local/Temp/~hh4A99.htm

27/06/2015

Combining Fields

Pgina 15 de 41

CYCLEBASEX() = Use this function to enable counting in any base numbering system. The number
system must be defined within the linked expression. The starting value, the amount of each increment,
and the number of copies of each number must also be specified. All of these values can be linked to
other fields on the label, but field names must not appear in quotes.
Usage: CYCLEBASEX(baseX_string,starting_value,increment,#copies)
baseX_string = Gives all of the digits in the numbering system in order. For example, the common Base
10 numbering system would be written as "0123456789".
starting_value = Enter the number from which the counting will begin. The value is entered in the base
X number system, and must appear within quotation marks " ". If the value entered is too large, the
program will return an 1853 error. Acceptable values depend upon the baseX_string and the
starting_value.
increment = Specify the amount to increment with each step. Negative numbers will cause the counting
to proceed in reverse order. This value must be entered as a Base 10 number ( 0-9).
#copies = Specify the number of copies of the same number that will be printed before incrementing to
the next value. This value must be entered as a Base 10 value (0-9).

Examples:
If a field named Base16 contains the string 0123456789ABCDEF, then...
CYCLEBASEX(base16,"8",1,1) would produce 8,9,A,B,C
CYCLEBASEX (base16,"F",-1,1) would produce F,E,D,C,B,A,9,8
CYCLEBASEX (base16,"B0",1,1) would produce B0, B1, B2

CYCLEBASEX ("012345","4",1,2) would produce 4,4,5,5,10,10,11,11

CYCLENUMBER () = Typically, counting follows the normal progression of numbers or letters


(0,1,2... or A,B,C...). This function allows you to set up your own custom sequence of numbers.
Usage: CYCLENUMBER(first_number,last_number,increment,copies)
first_number = The number printed on the first label in the series.
last_number = The last number in the cycle before starting over.

file:///C:/Users/SOPORTE-1/AppData/Local/Temp/~hh4A99.htm

27/06/2015

Combining Fields

Pgina 16 de 41

increment = (Optional) The value to increment each number by. If not included, then '1' is used, unless
the first number is larger than the last, in which case '-1' will be used. Negative numbers will count
down.
copies = (Optional) Specify the number of copies of each number to print before incrementing to the
next value. The default value is '1'.

Examples:
CYCLENUMBER(1,3) would produce labels sequenced 1 2 3 1 2 3 1 2 3...
CYCLENUMBER(1,3,1,2) would produce labels sequenced 1 1 2 2 3 3 1 1 2 2 3 3 1 1...

DOLLAR () = This will modify a field to represent a price.


Usage: DOLLAR(Field1)

Examples:
If a field named PRICE has a value of 199, then...
DOLLAR(PRICE) would produce $199.00

FIXED() = This function allows you to specify the number of decimal places to use for a numeric value,
and to specify whether or not to include the thousands separator (e.g., 10,000 or 10000).
Usage: FIXED(num1,#decimals,no-separator)
num1 = the number or the name of another field on the label to convert
#decimals = the number of decimal places to add to the value, zeroes are added after the decimal
no-separator = use 0 to include a separator, 1 to omit

Examples:
FIXED(12345,2,0) would produce 12,345.00

file:///C:/Users/SOPORTE-1/AppData/Local/Temp/~hh4A99.htm

27/06/2015

Combining Fields

Pgina 17 de 41

FIXED(12345,2,1) would produce 12345.00

HEX () = This will convert a decimal number to hexadecimal (Base 16) format. Decimal (Base 10)
numbers have digits that range from 0-9 (0123456789), whereas hexadecimal go from 0-F
(0123456789ABCDEF). Use this feature to convert a number into hex notation.
Usage: HEX(n1,n2)
n1 = The number to convert, or the name of another field.
n2 = The total width of the result to be created by adding leading zeros.

Examples:
HEX(605627,7) would produce 0093DBB.
HEX(10,3) would produce 00A.

Other Functions
COMMANDFILENAME() = Including this field on a label will add the name of the command file
being used to control printing of the label. If command files are not being used to print the label, then
this field will be left blank.
Usage: COMMANDFILENAME()
No parameters are accepted between the () following the COMMANDFILENAME command.

Examples:
If the command file being used to print the label is called Printing.cmd, then...
COMMANDFILENAME() would produce Printing

file:///C:/Users/SOPORTE-1/AppData/Local/Temp/~hh4A99.htm

27/06/2015

Combining Fields

Pgina 18 de 41

F1 () = This function will return the special UCC/EAN function character, FNC1, which is required for
certain bar code standards.
Usage: F1()

Examples:
"123" + F1() + "ABC" will encode a FNC1 character between the "123" and "ABC" data.

LABELNAME() = Including this field on the label design will add the name of the label to the
printout.
Usage: LABELNAME()
No parameters are accepted between the () following the LABELNAME command.

Examples:
If the current label is called LabelName.lbl, then...
LABELNAME() would produce LabelName

LABELSELECTVALUE() = This function adds the key field data from the Label Select database
used to call the label onto the label design (if LabelSelect is not used to print the label, then this field
will be left blank). It can then be used to drive a second database containing additional information,
since the Label Select file only contains Label Name, Printer Name, and a key field. Additional
database information must, therefore, be contained in a separate data file. LabelSelectValue allows the
supplemental database to be controlled by the first, without the need for the operator to enter the data a
second time. The second database can be called by the key field in the Label Select database by using
this function, then linking the key field for the second database to this field. Refer to the entry on
linking databases for more information.
Usage: LABELSELECTVALUE()

Examples:

file:///C:/Users/SOPORTE-1/AppData/Local/Temp/~hh4A99.htm

27/06/2015

Combining Fields

Pgina 19 de 41

If the current Label Select database record has a key field value of 1001, then...
LABELSELECTVALUE() would produce 1001

PRINTERNAME() = This function prints the printer name on the label. It uses the name of the printer
to which the label was sent.
Usage: PRINTERNAME()
No parameters are accepted between the () following the PRINTERNAME command.

Examples:
If the current printer is an HP LaserJet 4 on LPT2, then...
PRINTERNAME() would produce HP LaserJet 4 on LPT2

PRINTQTY () = This function will return the Print Quantity, which is the number of labels printed.
(Useful when logging the field to track the number of labels printed).
Usage: PRINTQTY()

RECQTY () = This function is used in conjunction with databases. When a field is set to use this
command, it will place on the label the quantity of labels printed for that specific record from the
database. If you select a series of records to print with varying quantities at the same time, this field will
print the number of each record printed.
Usage: RECQTY()

Examples:
If you have selected to print 5 copies of record number one from your database, 3 copies of record
number two, and 10 copies of record number three, this field will print '5' on all record one labels, '3' on
all for record two, and '10' on all of record three.

file:///C:/Users/SOPORTE-1/AppData/Local/Temp/~hh4A99.htm

27/06/2015

Combining Fields

Pgina 20 de 41

ZTRIM () = This function will trim all zeros from the left side of a numeric only field.
Usage: ZTRIM(field_name)

Examples:
If a field named WEIGHT has a value of 000200, then...
ZTRIM(WEIGHT) would produce 200

Linked Functions Used to Perform Logical


Operations
Logical operations and field comparisons can be performed with linked expressions. These expressions
will print a value of 1 or 0 depending upon the outcome of the statement. If the comparison is true
(10>5), then the program will print the value 1. If the comparison is false (10<5), the program will print
the value 0. Linked expressions also allow you to write "IF statements" that will return conditional
output based on the parameters and true/false result values you specify.
Note: In a linked expression, data typed within quotation marks is printed exactly as typed. Data written
without quotes is treated as a field name or function.
AND
EQUAL
EXACT
GREATER
GREATEREQUAL
IF
IF2
LESS

file:///C:/Users/SOPORTE-1/AppData/Local/Temp/~hh4A99.htm

27/06/2015

Combining Fields

Pgina 21 de 41

LESSEQUAL
NOT
NOTEQUAL
OR

AND() = This function compares the results from two expressions and prints a 1 only if BOTH are true
(a 0 (false) is printed otherwise). The two compared values are usually the result of an IF expression, or
some other operation occurring elsewhere on the label. Only 0 and 1 can be used as input for this
function.
Usage: AND(value1,value2)
value1,value2 = These are the results of two expressions occurring elsewhere on the label. They must
have a value of either 1 or 0.

Examples:
If field1 is named SMALL and has a value of 1, field2 is named BIG and has a value of 1, and field 3 is
named FIRST and has a value of 0, then...
AND(SMALL,BIG) would produce 1
AND(SMALL,FIRST) would produce 0

AND(1,1 ) would produce 1

EQUAL() = This compares two numeric values and prints the number 1 only if the two compared values
are the same (a 0 is printed otherwise).
Usage: EQUAL(value1,value2)
value1,value2 = These are the two values being compared. They can be entered as numbers or they can
be the names of fields already on the label.

file:///C:/Users/SOPORTE-1/AppData/Local/Temp/~hh4A99.htm

27/06/2015

Combining Fields

Pgina 22 de 41

Examples:
If field1 is named SMALL and has a value of 10, field2 is named BIG and has a value of 20, and field 3
is named FIRST and has a value of 20, then...
EQUAL(SMALL,BIG) would produce 1
EQUAL(BIG,FIRST) would produce 1

EQUAL(99,99 ) would produce 1


EQUAL(64,81 ) would produce 0

EXACT() = This compares two strings and prints the number 1 only if they are exactly the same (a 0 is
printed otherwise). This is similar to the EQUAL function, but it is for use with alphanumeric data.
Usage: EXACT(string1,string2)
string1,string2 = These are the two strings or fields being compared. They can be entered as a string of
characters enclosed within quotes " ", or they can be the names of fields already on the label.

Examples:
If field1 is named FIRST and has a value of "Hello", and field2 is named SECOND and has a value of
"Goodbye", then...
EXACT(FIRST,SECOND) would produce 0

EXACT("Bob","Bob" ) would produce 1


EXACT("Bob","bob" ) would produce 0

GREATER() = This compares two numeric values and prints the number 1 only if the first value is
larger than the second value (a 0 is printed otherwise).

file:///C:/Users/SOPORTE-1/AppData/Local/Temp/~hh4A99.htm

27/06/2015

Combining Fields

Pgina 23 de 41

Usage: GREATER(value1,value2)
value1,value2 = These are the two numbers being compared. They can be entered as numbers, or they
can be the names of fields already on the label.

Examples:
If field1 is named SMALL and has a value of 10, and field2 is named BIG and has a value of 20, then...
GREATER(SMALL,BIG) would produce 0
GREATER(BIG,SMALL) would produce 1

GREATER(99,99 ) would produce 0


GREATER(100,50 ) would produce 1

GREATEREQUAL() = This compares two numeric values and prints the number 1 only if the first
value is larger than or equal to the second value (a 0 is printed otherwise).
Usage: GREATEREQUAL(value1,value2)
value1,value2 = These are the two numbers being compared. They can be entered as numbers, or they
can be the names of fields already on the label.

Examples:
If field1 is named SMALL and has a value of 10, and field2 is named BIG and has a value of 20, then...
GREATEREQUAL(SMALL,BIG) would produce 0

GREATEREQUAL(99,99 ) would produce 1


GREATEREQUAL(100,50 ) would produce 1
GREATEREQUAL(50,100 ) would produce 0

file:///C:/Users/SOPORTE-1/AppData/Local/Temp/~hh4A99.htm

27/06/2015

Combining Fields

Pgina 24 de 41

IF () = A linked expression that allows the label to have conditional output.


Usage: IF(field1 OPERATOR field2,TrueResult,False Result)
field1 OPERATOR field2 = The two field names which are being compared, separated by the
appropriate operator.

Operators:
= equal
<> not equal
< less than
> greater than
<= less than or equal
>= greater than or equal to

Examples:
If a company has a price structure as shown below...

Quantity

Price

0-500

$28.95

501-

$19.95

...and a field named QUANTITY, the following IF() function could be used:

IF(QUANTITY<=500,28.95,19.95)

file:///C:/Users/SOPORTE-1/AppData/Local/Temp/~hh4A99.htm

27/06/2015

Combining Fields

Pgina 25 de 41

IF2() = IF2 offers an alternate method (vs. the standard IF function) of creating a linked expression with
conditional output.
Usage: IF2(expr,TrueResult,False Result)
expr = A linked expression using a function to compare two strings separated by a comma.
TrueResult = The result if expr is true.
FalseResult = The result if expr is false.

Examples:
IF2(exact("string", "string"), "true","false")) would produce true
IF2(exact("s tring", "string"), "true","false")) would produce false

LESS() = This compares two numeric values and prints the number 1 only if the first value is smaller
than the second value (a 0 is printed otherwise).
Usage: LESS(value1,value2)
value1,value2 = These are the two numbers being compared. They can be entered as numbers, or they
can be the names of fields already on the label.

Examples:
If field1 is named SMALL and has a value of 10, and field2 is named BIG and has a value of 20, then...
LESS (SMALL,BIG) would produce 1
LESS (BIG,SMALL) would produce 0

LESS (99,99 ) would produce 0


LESS (10,50 ) would produce 1

file:///C:/Users/SOPORTE-1/AppData/Local/Temp/~hh4A99.htm

27/06/2015

Combining Fields

Pgina 26 de 41

LESSEQUAL() = This compares two numeric values and prints the number 1 only if the first value is
smaller than or equal to the second (a 0 is printed otherwise).
Usage: LESSEQUAL(value1,value2)
value1,value2 = These are the two numbers being compared. They can be entered as numbers, or they
can be the names of fields already on the label.

Examples:
If field1 is named SMALL and has a value of 10, and field2 is named BIG and has a value of 20, then...
LESSEQUAL(SMALL,BIG) would produce 1

LESSEQUAL(99,99 ) would produce 1


LESSEQUAL(100,50 ) would produce 0
LESSEQUAL(50,100 ) would produce 1

NOT() = This logical operation will return the logical opposite of the input value. True (1) becomes
False (0), and False becomes True.
Usage: NOT(value1)
value1 = This is the value to invert. It must be a 1 or 0, or the name of another field that has the value
of 1 or 0.

Examples:
If field1 is named SMALL and has a value of 1, and field2 is named BIG and has a value of 0, then...
NOT(SMALL) would produce 0
NOT(BIG) would produce 1

NOT(1) would produce 0

file:///C:/Users/SOPORTE-1/AppData/Local/Temp/~hh4A99.htm

27/06/2015

Combining Fields

Pgina 27 de 41

NOT(0) would produce 1

NOTEQUAL() = This compares two numeric values and prints the number 1 only if they are NOT the
same (a 0 is printed otherwise).
Usage: NOTEQUAL(value1,value2)
value1,value2 = These are the two numbers being compared. They can be entered as numbers, or they
can be the names of fields already on the label.

Examples:
If field1 is named SMALL and has a value of 10, and field2 is named BIG and has a value of 20, and
field3 is named FIRST and has a value of 20, then...
NOTEQUAL(SMALL,BIG) would produce 1
NOTEQUAL(BIG,FIRST) would produce 0

NOTEQUAL(99,99 ) would produce 0


NOTEQUAL(64,81 ) would produce 1

OR() = This is a logical operation that compares the results from two expressions and prints 1 if either
are true (a 0 is printed otherwise). These values are usually the result of an IF expression, or some other
operation occurring elsewhere on the label. Only 0 and 1 can be used as input for this operation.
Usage: OR(value1,value2)
value1,value2 = These are the results of two expressions occurring elsewhere on the label. They must
have a value of either 1 or 0.

Examples:
If field1 is named SMALL and has a value of 1, field2 is named BIG and has a value of 0, and field 3 is
named FIRST and has a value of 0, then...

file:///C:/Users/SOPORTE-1/AppData/Local/Temp/~hh4A99.htm

27/06/2015

Combining Fields

Pgina 28 de 41

OR(SMALL,BIG) would produce 1


OR(BIG,FIRST) would produce 0

OR(1,0 ) would produce 1


OR(0,0) would produce 0

Linked Functions Used to Perform


Mathematical Operations
The functions listed below allow you to perform mathematical operations using numbers or numeric
field values on your label.
Note: In a linked expression, data typed within quotation marks is printed exactly as typed. Data written
without quotes is treated as a field name or function.
ADD
DIV
INT
MOD
MULT
NEGATE
POW
QUOTIENT
ROUND
SUB
TRUNC

file:///C:/Users/SOPORTE-1/AppData/Local/Temp/~hh4A99.htm

27/06/2015

Combining Fields

Pgina 29 de 41

ADD() = This function produces the sum of two numeric fields.


Usage: ADD(field1,field2,#_of_decimals)
field1,field2 = Two numbers or names of numeric-only fields on the label.
#_of_decimals = The number of decimal places to be used in the result.

Examples:
If a field named TOTAL had a value of 100 and a field named TAX had a value of 7, then...
ADD (TOTAL,TAX,2) would produce 107.00
ADD (TOTAL,5.1)

would produce 105.1

DIV() = Use this function to divide the value of field1 by field2.


Usage: DIV(field1,field2,#_of_decimals)
field1,field2 = Two numbers or names of numeric-only fields on the label.
#_of_decimals = The number of decimal places to use in the result.

Examples:
If field1 is named TOTAL and has a value of 100 and field2 is named TAX and has a value of 7, then...
DIV(TOTAL,TAX,2) would produce 14.28
DIV(TOTAL,3) would produce 33

INT() = The given value will be rounded DOWN to the nearest integer. (Any decimal portion is
dropped.)
Usage: INT(value)
value = A number or the name of a numeric-only field on the label.

file:///C:/Users/SOPORTE-1/AppData/Local/Temp/~hh4A99.htm

27/06/2015

Combining Fields

Pgina 30 de 41

Examples:
INT(234.56)

would produce

234

INT(-234.56) would produce -235

MOD() = Use this function to calculate the remainder when field1 is divided by field2 (useful in
calculating check digits for certain bar codes).
Usage: MOD(field1,field2)
field1,field2 = Two numbers or names of numeric-only fields on the label.

Examples:
If field1 is named PRICE and has a value of 100 and field2 is named QTY and has a value of 8, then...
MOD(PRICE,QTY) would produce 4

(100/8 = 12 with a remainder of 4)

MULT() = This function will multiply field1 by field2.


Usage: MULT(field1,field2,#_of_decimals)
field1,field2 = Two numbers or names of numeric-only fields on the label.
#_of_decimals = The number of decimal places to use in the result.

Examples:
If field1 is named PRICE and has a value of .99 and field2 is named QTY and has a value of 8, then...
MULT(PRICE,QTY,3) would produce 7.920
MULT(PRICE,3.1) would produce 3.07

file:///C:/Users/SOPORTE-1/AppData/Local/Temp/~hh4A99.htm

27/06/2015

Combining Fields

Pgina 31 de 41

NEGATE() = Multiplies the given number by 1.


Usage: NEGATE(number)
number = A number or the name of a numeric-only field on the label.

Examples:
If a field is named NUM1 and has a value of 123 and another field is named NUM2 and has a value of
987, then...
NEGATE(NUM1) would produce -123
NEGATE(NUM2) would produce 987

NEGATE(69) would produce -69

POW() = This function is used to calculate exponential values or powers. Field1 is raised to the power
of field2. The result will be calculated to four decimal places.
Usage: POW(base,exponent)
base = The number being raised to a power. Enter either a number or the name of a numeric-only field.
exponent = The power value (decimal values are permitted).

Examples:
POW(2,3) would produce 8.0000
POW(3,2) would produce 9.0000
POW(100,0.5) would produce 10.0000

file:///C:/Users/SOPORTE-1/AppData/Local/Temp/~hh4A99.htm

27/06/2015

Combining Fields

Pgina 32 de 41

QUOTIENT() = This function gives the integer value of field1 divided by field2. (Any decimal portion
is dropped.)
Usage: QUOTIENT(field1,field2)
field1,field2 = Two numbers or names of numeric-only fields on the label.

Examples:
If field1 has a value of 100 and field2 has a value of 8, then...
QUOTIENT(field1,field2) would produce 12
QUOTIENT(field1,20) would produce 5

ROUND() = Rounds the given number to the number of decimal places specified.
Usage: ROUND(number,#decimals)
number = The number (with decimals) to be rounded. This can be a number or the name of a numericonly field.
#decimals = The number of decimal places to use when rounding the number. This can be a number or
the name of a numeric-only field.

Examples:
ROUND(123.456,1) would produce 123.5
ROUND(123.456,0) would produce 123

If a field named TOTAL has a value of 12.34567, and a field named DECPLACES has a value of 2,
then...
ROUND(TOTAL,DECPLACES) would produce 12.35

file:///C:/Users/SOPORTE-1/AppData/Local/Temp/~hh4A99.htm

27/06/2015

Combining Fields

Pgina 33 de 41

SUB() = This function subtracts field2 from field1.


Usage: SUB(field1,field2,#_of_decimals)
field1,field2 = Two numbers or names of numeric-only fields on the label.
#_of_decimals = The number of decimal places to use in the result.

Examples:
If field1, named TOTAL, has a value of 100 and field2, named TAX, has a value of 7, then...
SUB(TOTAL,TAX,2) would produce 93.00
SUB(5,TAX,1) would produce -2.0

TRUNC() = This function returns the integer value of the given number. (Any decimal portion is
dropped.)
Usage: TRUNC(number)
number = A number or the name of a numeric-only field.

Examples:
If field1 is named NUM and has a value of 98.765, then...
TRUNC(NUM) would produce 98

TRUNC(-25.36) would produce -25

Date and Time Functions


The following functions generate the current date and/or time in varying formats. The result is based
upon the computers internal clock, which must be correct for these functions to be accurate.

file:///C:/Users/SOPORTE-1/AppData/Local/Temp/~hh4A99.htm

27/06/2015

Combining Fields

Pgina 34 de 41

Note: In a linked expression, data typed within quotation marks is printed exactly as typed. Data written
without quotes is treated as a field name or function.
DAY
HOUR
MINUTE
MONTH
NOW
TODAY
WEEKDAY
YEAR
SYS_DATE
SYS_DAY
SYS_HOUR
SYS_JULIAN
SYS_MINUTE
SYS_MONTH
SYS_SECOND
SYS_TIME
SYS_YEAR

DAY() = This function will print out the day of the month.
Usage: DAY(time)
time: This can be either of the NOW() or TODAY() functions. No other operator is permitted.

file:///C:/Users/SOPORTE-1/AppData/Local/Temp/~hh4A99.htm

27/06/2015

Combining Fields

Pgina 35 de 41

Example:
If the current date is Monday, April 12, 1999, then...
DAY(NOW()) would produce 12
DAY(TODAY()) would produce 12

HOUR() = This function will print out the current hour. AM or PM has no effect upon the final output;
both will print the same value.
Usage: HOUR(time)
time: This can be either of the NOW() or TODAY() functions. No other operator is permitted.

Example:
If the current time is 8:41 PM, then...
HOUR(NOW()) would produce 8
HOUR(TODAY()) would produce 8

MINUTE() = This function will print out the current minute value.
Usage: MINUTE(time)
time: This can be either of the NOW() or TODAY() functions. No other operator is permitted.

Example:
If the current time is 8:41 PM, then...
MINUTE(NOW()) would produce 41
MINUTE(TODAY()) would produce 41

file:///C:/Users/SOPORTE-1/AppData/Local/Temp/~hh4A99.htm

27/06/2015

Combining Fields

Pgina 36 de 41

MONTH()= This function will print out the numeric value for the month of the year.
Usage: MONTH(time)
time: This can be either of the NOW() or TODAY() functions. No other operator is permitted.

Example:
If the current date is Monday, April 12, 1999, then...
MONTH(NOW()) would produce 4
MONTH(TODAY()) would produce 4

NOW() = This function will print the current date and time value in the following format: mm/dd/yy
hh:mm am/pm. The NOW function is used as the key for many of the other date functions.
Usage: NOW()
No value can appear within the parentheses.

Example:
If the current date and time is 9:10 AM on September 22, 1999, then...
NOW() would produce 09/22/99 09:10 am

TODAY() = This function will print the current date value in the following format: mm/dd/yy. The
TODAY function is used as the key for many of the other date functions.
Usage: TODAY()
No value can appear within the parentheses.

file:///C:/Users/SOPORTE-1/AppData/Local/Temp/~hh4A99.htm

27/06/2015

Combining Fields

Pgina 37 de 41

Example:
If the current date is September 22, 1999, then...
TODAY() would produce 09/22/99

WEEKDAY() = This function will print the current day of the week in numeric form, based upon
Sunday as the first day. SUNDAY=1, MONDAY=2, etc.
Usage: WEEKDAY(date)
date: This is either of the NOW() or TODAY() functions; both will produce the same result.

Example:
If the current day of the week is Wednesday, then...
WEEKDAY(now()) would produce 4

YEAR() = This function will print the current year in a 4-digit format (e.g., 1999).
Usage: YEAR(date)
date: This is either of the NOW() or TODAY() functions; both will produce the same result.

Example:
If the current year is 2001, then...
YEAR(now()) would produce 2001

SYS_DATE() = This function will print the current date in the following format: mm/dd/yy.
Usage: SYS_DATE()

file:///C:/Users/SOPORTE-1/AppData/Local/Temp/~hh4A99.htm

27/06/2015

Combining Fields

Pgina 38 de 41

Example:
If the current date is March 6, 2003, then...
SYS_DATE() would produce 03/06/03

SYS_DAY() = This function will print the current day of the month in a 2-digit format.
Usage: SYS_DAY()

Example:
If the current date is March 6, 2003, then...
SYS_DAY() would produce 06

SYS_HOUR() = This function will print the current hour in a 24-hour day.
Usage: SYS_HOUR()

Example:
If the current time is 3:52 PM, then...
SYS_HOUR() would produce 15

SYS_JULIAN() = This function will print the current day of the year according to the Julian calendar.
Usage: SYS_JULIAN()

file:///C:/Users/SOPORTE-1/AppData/Local/Temp/~hh4A99.htm

27/06/2015

Combining Fields

Pgina 39 de 41

Example:
If the current date is March 6, then...
SYS_JULIAN() would produce 65

SYS_MINUTE() = This function will print the current minute within the hour.
Usage: SYS_MINUTE()

Example:
If the current time is 3:52 PM, then...
SYS_MINUTE() would produce 52

SYS_MONTH() = This function will print the current month in a 2-digit format.
Usage: SYS_MONTH()

Example:
If the current date is March 6, then...
SYS_MONTH() would produce 03

SYS_SECOND() = This function will print the current second within the minute.
Usage: SYS_SECOND()

Example:

file:///C:/Users/SOPORTE-1/AppData/Local/Temp/~hh4A99.htm

27/06/2015

Combining Fields

Pgina 40 de 41

If the current time is 3:52:45 PM, then...


SYS_SECOND() would produce 45

SYS_TIME() = This function will print the current time in the following format: hh:mm am/pm.
Usage: SYS_TIME()

Example:
If the current time is 3:52 PM, then...
SYS_TIME() would produce 03:52 pm

SYS_YEAR() = This function will print the current year in a 2-digit format.
Usage: SYS_YEAR()

Example:
If the current year is 2003, then...
SYS_YEAR() would produce 03

Check Digit Functions


The following check digit functions can be used to calculate many of the most common bar code check
digits. Some of these check digits are calculated automatically within the respective bar code, but you
can also manually calculate a check digit using the following check digit functions.
Note: The check digit functions will give a result of the calculated check digit only and NOT the bar
code value. To print the entire value with the check digit appearing at the end of the string, use a
function beginning with ADD (e.g., ADDMOD10()). If you want the entire value to appear before the
check digit, another option is to simply add the value to the beginning of the linked expression. For
example, TEXT1 + MOD10(TEXT1).

file:///C:/Users/SOPORTE-1/AppData/Local/Temp/~hh4A99.htm

27/06/2015

Combining Fields

Pgina 41 de 41

BIMODULO11()
CANADACUSTOMSCD()
CHECK128()
CHECKUPCE()
MOD10()
ADDMOD10()
MOD10_212()
ADDMOD10_212()
MOD43()
ADDMOD43()
MODULO10IBM()
MODULO11()
MODULO11IBM()
MODULO24()
MODULO32()
MODULO47()
PLESSEY()
PRICECD()
PRICECD5()
UPSMOD10()

file:///C:/Users/SOPORTE-1/AppData/Local/Temp/~hh4A99.htm

27/06/2015

S-ar putea să vă placă și