A SERVICE OF

logo

Chapter 3 Defining rules and queries 51
Defining rules
rtrim(string)
(where string is a
constant, field name,
or function)
function|rtrim("abc ")
Removes any trailing blanks from
a string:
abc
second(timestamp)
(where timestamp is a
constant, field name,
or function)
function|second
($createdate$)
(if
$createdate$ is set to
Friday, August 3, 2007
12:15:00 a.m.)
Returns the second from the time
stamp (0 to 59):
0
status() function|status()
Returns an integer value to
indicate the completion status for
the transfer of data for an
individual record:
0 indicates that the data
transferred without error.
1 indicates that an error occured.
This function is only used for
response mapping.
strstr(string,
string)
(where string is a
constant, field name,
or function)
Example 1:
function|strstr
("abcdefg", "def")
Example 2 (values in
database field
char1 for 5
records):
fantastic
africa
ice
liver
rice
function|strstr
($char1$, “ic”)
Returns an integer indicating the
position of a string within a string.
Starting position is 0 indexed. If the
string is not found,
-1 is returned.
Example 1:
3
Example 2:
7
3
0
-1
1
substr(string,
long,[,long])
(where string and
long are constants,
field names, or
functions)
function|substr
("abcdefg", 2, 4)
Returns the substring of characters
in a string starting at a specified
position up to an optional end
position. Starting position is 0
indexed:
cde
timestamp() function|timestamp()
Returns the current time as an
AR System time stamp:
Friday, August 3, 2007
12:15:00 am
time(timestamp)
(where timestamp is a
constant, field name,
or function)
function|time
($createdate$)
(if $createdate$ is set to
Friday, August 3, 2007
12:15:00 a.m.)
Returns the time portion of the
time stamp (as a character string):
12:15:00
Table 3-4: Function syntax examples
Function Example Results