Functions

The following functions can be used in a RecordBox, RecordArea, or FormattedRecordArea.

Function Examples Description
Abs( a ) Abs( Total ) Returns the absolute value of a.
Add( a, b ) Add( SubTotal, Freight ) Adds two numbers together.
And( a, b ) And( QuantityA, QuantityB ) Returns the logical conjunction on two Boolean expressions, or a bitwise conjunction on two numeric expressions.
Ceiling( a ) Ceiling( Total ) Returns the smallest integer that is not less than a.
Concat( a, b ) Concat( FirstName, LastName ) Returns the concatenated string.
CurrentDateTime( ) CurrentDateTime( ) Returns the current date and time.
DateAdd( datepart, number, date ) DateAdd( Year, 1, OrderDate ) Returns a new datetime value based on adding an interval to the specified date.
DateDiff( datepart, startdate, enddate ) DateDiff( Day, OrderDate,  ShipDate ) Returns the number of date and time boundaries crossed between two specified dates.
Day( a ) Day( OrderDate ) Returns the day from the date.
Divide( a, b ) Divide( Total, 12 ) Divides a by b.
EQ( a, b ) EQ( QuantityA, QuantityB ) Returns true if a is equal to b.
Floor( a ) Floor( Total ) Returns the nearest integer that is less than or equal to a.
Format( a, b ) Format( UnitPrice, "0.00" ) Formats a using the b format.
FV( a, b, c[, d[, e&cd; ) FV( Rate, Period, Payment, PresentValve, DueDate ) Returns the future value of an investment.
GT( a, b ) GT( QuantityA, QuantityB ) Returns true if a is greater than b.
GTE( a, b ) GTE( QuantityA, QuantityB ) Returns true if a is greater or equal to b.
Hour( a ) Hour( "12/12/2006 4:11:05 PM") Returns the hour from the date.
IIF( a[, b[, c&cd; ) IIF( GTE( 2, 0 ), FirstName, LastName ) Returns one of two values depending on the value of 'a'.
IsNull( a[, b] ) IsNull( FirstName ) Determines whether a specified value is null.
Left( a, b ) Left( Name, 1 ) Returns the first b letters from a.
Len( a ) Len( Name ) Returns the length of the string.
LT( a, b ) LT( QuantityA, QuantityB ) Returns true if a is less than b.
LTE( a, b ) LTE( QuantityA, QuantityB ) Returns true if a less than or equal to b.
Minute( a ) Minute( OrderDate ) Returns the minute from the date.
Mod( a, b ) Mod( QuantityA, QuantityB  ) Returns the remainder of a divided by b.
Month( a ) Month( "12/12/2006 4:11:05 PM" ) Returns the month from the date.
Multiply( a, b ) Multiply( UnitPrice, Quantity ) Multiplies two numbers together.
Negate( a ) Negate( Total ) Returns the negative of a.
Not( a ) Not( QuantityA ) Returns the logical negation on a Boolean expression.
NotEq( a, b ) NotEq( OrderTotal1,  OrderTotal2 ) Returns a true if a and b are not equal, otherwise returns a false.
Or( a, b ) Or( QuantityA, QuantityB ) Returns the logical disjunction on two Boolean expressions, or a bitwise disjunction on two numeric expressions.
PMT( a, b, c[, d[, e&cd; ) PMT( Rate, Period, PresentValue, FutureValve, DueDate ) Returns a value specifying the payment for an annuity.
Pow( a, b ) Pow( 2, 3 ) Returns the value of a raised to the power b.
PV( a, b, c[, d[, e&cd; ) PV( Rate, Period, Payment, FutureValve, DueDate ) Returns the present value of an investment.
Rate( a, b, c[, d[, e[, f&cd;] ) Rate( Period, Payment, PresentValue, FutureValve, DueDate, Guess ) Returns a value specifying the interest rate per period for an annuity.
Replace( a, b ) Replace( FirstName, "a", "b" ) Replaces all occurrences of a specified character or String with another specified Unicode character or String.
Round( a, b ) Round( Total, Count ) Returns number a rounded to b decimal places.
Right( a, b ) Right( Name, 1 ) Returns the last b letters from a.
Second( a ) Second( "12/12/2006 4:11:05 PM") Returns the second from the date.
Sqrt( a ) Sqrt( Number ) Returns the square root of the specified numeric expression.
StrComp( a, b ) StrComp( FirstName, LastName ) Returns a value indicating the result of a string comparison.
StrReverse(a) StrReverse( Name ) Returns a string in which the character order 'a' is reversed.
SubString( a, b, c ) SubString( Name, 1, 4 ) Returns 'c' characters from string 'a' starting from position 'b'.
Subtract( a, b ) Subtract( Total, Tax ) Subtracts b from a.
Tilde( a ) Tilde( QuantityA, QuantityB  ) Returns the bitwise complement operation on its operand, which has the effect of reversing each bit.
Trim( a ) Trim( Name ) Removes the white space before and after the string.
ToLower( a ) ToLower( Name ) Changes all letters to lowercase.
ToUpper( a ) ToUpper( Name ) Changes all letters to uppercase.
WeekDayName( a ) WeekDayName( "12/12/2006 4:11:05 PM" ) Returns a string indicating the specified day of the week.
Xor( a, b ) Xor( QuantityA, QuantityB ) Returns the logical exclusion on two Boolean expressions, or a bitwise exclusion on two numeric expressions.
Year( a ) Year( OrderDate ) Returns the year from the date.

Functions can be set as the DataName property of a RecordBox.

Functions are enclosed within pound signs in a RecordArea or FormattedRecordArea:

     Hello #FirstName# #LastName#,  
           Your order total is #Add(SubTotal, Freight)#.
     Sincerely,
     Order Department

In this topic