Barcode Label Software Formulas

Description Example Usage Output
Variables
L# := Label Number L#  1
T# := Total Number of Labels
(if a dataset is linked or embedded)
T# 5
$myVar := Custom variable called 'myVar' $myVar = "123"
$myVar
123
Operators
/ := divide $labelsPerPage=5
"TotalPages =" & T#/$labelsPerPage
TotalPages=1
* := multiply L#/T# * 100 & "% done" 20% done
& := concatenate words "Label " & "L# & "of" & T# Label 1 of 5
- := subtract "Labels left = " & T# - L# Labels left = 4
+ := add "Next Label = " & L# + 1 Next Label = 2
VBCRLF := Carriage Return + Line Feed "Line1" & VBCRLF & "Line2" Line1
Line2
Macros
Chr(charcode):= ASCII Number to Char Chr(73) & Chr(68) & Chr(65) IDA
Currency(exp,nl) := converts exp to a currency
exp := string
n := number of decimal places
Currency(12,2) $12.00
InStr(haystack,needle) := returns the index of the needle in the haystack "m is at " & Instr("IDAutomation",m) m is at 7
Len(source) := returns the length of [source] text. Len("IDAutomation") 12
Left(source,x) := returns the first [x] characters in
[source] starting from the left.
Left("IDAutomation",3) IDA
Mid(source,x,y) := returns a substring of [source]
starting at position [x] of length [y].
Mid("IDAutomation",3,4) Auto
Right(source,x) returns the first [x] characters in
[source] starting from the right.
Right("IDAutomation",6) mation
Number(source, [n], [paren], [group])
source := expression to convert
[n] := number of decimal places (2)
[paren] := negative values have parans(False)
[group] := groupd digits (True)
Number(-1234.56789, 2)
Number(-1234.56789, 4)
Number(-1234.56789, 4, true)
Number(-1234.56789, 4, true, false)
-1,234.57
-1,234.5679
(1,234.5679)
(1234.5679)
If(test, t-exp, f-exp)
Evaluates the test and if true (or 1), the t-exp is
evaluated and returned, otherwise the f-exp is
evaluated and returned.
Valid Test Operators: == equal;
<> or != is not equal;
<= or =< is less than or equal;
>= or => is greater than or equal;
< less than and > greater than.
$x = Right(L#,1)
$Result = (
if($x == "0", "Even",
if($x == "2", "Even",
if($x == "4", "Even",
if($x == "6", "Even",
if($x == "8", "Even", "Odd"))))))
L# & " is " & $Result
1 is Odd
Date/Time Macros
Date() := the current date Date() 05/21/2015
Time() := the current time Time() 11:10 AM
Year() := the current year Year() 2015
Month() := the current month Month() 5
MonthName() := the current month name MonthName() May
Day() := the current day of the month Day() 21
DayName() := the current day name DayName() Thursday
Conversions
Mod10(int) := the GS1 MOD10 check character Mod10(12345678901) 2
ISO7064(text) := the ISBTK check character ISO7064(W000007123456) D
Base4(int1,optional int2) := base-4 encoding of
int1 while int2 defines the offset to add to the
result -- int2 defaults to 48
Base4(500) & vbcrlf &
Base4(500,65)
13310
BDDBA
Base2(int1, optional int2) := base-2 encoding of
int1 while int2 defines the offset of each digit
int2 defaults to 48
Base2(5) & vbcrlf &
Base2(5,65)
101
BAB
Label Fields    
LabelField(name) := the value of the custom
global variables associated with the label
LabelField(SerialNumber) 1
External Data
Field(col) := the value in the linked data source
for the column of the current row
(The current row is defined as the label number)
Field(1) Joe Smith
FieldName(name) := the value in the linked data
source for the column of the passed-in name and
the current row
FieldName(Age) 21
Table(id).Field(row,col) := the value of the
linked data source [id] corresponding to the
respective [row] and [col]
Table(1).Field(1,1) Joe Smith
Table(id).Rows := count of rows in the linked
data source [id].
Table(1).Rows 5
Table(id).Columns= count of columns in the
linked data source [id].
Table(1).Columns 2