List: RAD functions

A RAD function is an operand, which means that it can be used in any expression on the right hand side of an equals sign. Functions provide a method of performing certain commands that will return a value when executed. For example:

  • operator()--returns the logged-on operator ID.
  • tod()--returns the current date and time.
  • option()--returns GUI option number of the last displayoption selected.

RAD functions can be used in statements to further define selection criteria and/or execute commands, initialize values, and perform calculations. Service Manager syntax rules must be followed. For example, the result of a RAD function can be assigned to a variable using the assign (=) assignment statement: $string.length=lng($string)

In most cases, there is a JavaScript function that can do the same operation as a RAD function. If you prefer to work with JavaScript rather than RAD, see Using RAD functions in JavaScript for more information.

Function Description
add.graphnodes(xml) Returns XML to the Run-Time Environment (RTE) for the expand action on a node in the graph diagram.
cache.flush Removes the specified item from the memory cache.
clean.display.value

Cleans up (clears) the display value of a field in a file.

cleanup Frees the storage associated with a variable.
contents Returns a structure containing the current record in a file variable.
copyright Returns a string with the HPE copyright notice.
currec Represents the current file handle in queries.
current.device Returns a string with the type of system the user is using to log in to Service Manager, such as "SOAP-Windows Vista."
current.format Returns a string containing the name of the current format.
cursor.field.contents Returns a string containing the contents of the input field in which the cursor was positioned when the last interrupt key was pressed.
cursor.field.display.content Returns a string that contains the display value of the field where the cursor is currently positioned.
cursor.field.display.content.set Sets the display value of the field where the cursor is currently positioned.
cursor.field.name Returns a string containing the name of the field in which the cursor was positioned when the last interrupt key was pressed.
cursor.field.name.set Moves the cursor to a field.
cursor.field.readonly Returns true if the selected field is read-only. Returns false if the selected field is not read only.
cursor.line Returns the number of the line, relative to the screen, in which the cursor was positioned when the last interrupt key was pressed.
date Returns the date portion of a date/time variable and defaults time portion to ’00:00:00‘.
datecmp Translates the date/time fields to the correct SQL statement dialect.
day Returns the day of the month for a date regardless of the date format.
dayofweek Returns a number from 1 to 7 representing the day of the week for a specific date.
dayofyear Returns the day of the year for a date regardless of the date format.
dbdict.helper(“db.type”) Helps retrieve the current RDBMS type.
dbdict.helper(“field.type”) Helps retrieve the field type property efficiently.
dbdict.helper(“is.alias”) Helps determine whether a field is an alias or not.
dbdict.helper(“joinfile.names”)

Helps retrieve an array of names of the sub files that belong to a join file.

dbdict.helper(“unique.key”) Helps retrieve the first unique key or the primary key of a file efficiently.
delete Returns an array with specific elements deleted.
denull Returns an array with all trailing NULL entries deleted.
descriptor Returns the database dictionary descriptor record for a file variable.
display.value.copy Copies all of the display values from one file to another.
evaluate Executes a specific string as though it were a processing statement.
evaluate.query Evaluates a query against a record.
evaluate_query Parses and evaluates a query.
exists Checks for the existence of a field in a file.
fduplicate Copies an entire file variable from one record to another.
filename Returns a string containing the name of the file for a specified file variable.
filequeryex Returns the query parameters of a file variable.
frestore Restores all fields in a file variable to their original database values.
genout Generates a formatted string based on a record and format name passed as parameters.
get.base.form.name Returns the base name of a form, stripping off the form extension for GUI or Web forms.
get.dateformat Returns the date format of the current operator ID.
get.display.value Returns the display value of a field in a Service Manager file.
get.graph.action Returns the activated action on a node in the graph diagram.
get.graph.id Returns the value of the graph ID for the expand action on a node in the graph diagram.
get.graphnode.id Returns the value of the node ID for the expand action on a node in the graph diagram.
get.graph.target Returns the target for an activated action on a node in the graph diagram.
get.lock.owner Returns the name of the owner of a resource lock.
get.timezoneoffset Returns the absolute time difference between GMT and the time zone of the operator.
get.uid Returns a 24-character identifier that is unique to an installation of Service Manager
gui Determines whether or not Service Manager is running in GUI mode.
index Returns the element number of an array or the position in a string that matches a specified string.
insert Returns a modified array with a specified number of new elements inserted at a specified location.
iscurrent Determines if the record with which you are working is identical to the version stored in the database.
isExpressionValid Determines in a RAD expression is a valid expression of a specified data type.
isfileexist Determines whether a file exists or not.
jscall Enables you to invoke JavaScript from within RAD.
lioption Indicates whether a given input value is a licensed option on the current system.
lng Returns the number of elements in an array or characters in a string.
locks Returns array of current outstanding locks.
logoff Logs a user off.
logon Logs a user on.
mandant Allows an application to create a subset of the current Mandanten values.
max Returns the largest value in a list of values or in an array.
messages Provides logging functions for use in the memory message log. The log is implemented as a wrap-around cache of the x most recent messages (error, informational, and action).
min Returns the smallest value in a list of values or in an array.
modtime Returns the time a record was last modified.
month Returns the month of year for a date regardless of the date format.
multiselect.selection("fieldcontents") Returns the contents of the fields associated with the multiselection.
multiselect.selection("fieldname") Returns the field name of the column associated with the multiselection. The associated column name is set using the Forms Designer property "Selection Field."
multiselect.selection("rows") Returns an array of row numbers that were selected.
multiselect.selection("selected") Returns true or false if the provided file variable has multiple records selected.
multiselect.selection("selections") Returns the number of rows selected.
multiselect.selection("tablename") Returns the Table ID associated with the multiselection.
null Returns true if the value of a variable is NULL. Returns false if the value of a variable or field is not NULL.
nullsub Substitutes a null field with the value given.
operator Returns the string of the name of the currently logged on operator.
option Returns the number of the last option key pressed.
parse Returns an evaluative expression from a given string value.
perf Evaluates system performance and writes the information to disk.
policyread Reads the data policy from a datadict table.
processes Returns array of current logged on processes.
prof Returns the value requested on various system performance profiles.
recordcopy Copies a set of fields from one record to another record.
recordtostring Takes the value of a field from an array and appends the value to a string.
round Returns a number rounded to a specified number of digits.
same Compares two compound or null values. Returns true if two values are identical, otherwise returns false.
scmsg Returns a text string matching the format of the message ID number and message class specified. The function replaces any variables in the message with the text specified in an array of values.
set.display.value Sets the display value for a field in a file.
set.timezone Sets time zone and other system parameters.
setsort Sorts the fields of an array in a file.
shutdown Shuts down Service Manager from inside the system. This function does not return any values.
simple file load Loads an unload file containing only data records of one file into a target file.
sleep

Temporarily ceases the execution of an executing thread for the specified number of seconds.

str Returns a string of a string or non-string data variable.
stradj Makes a string a specific length by either clipping or adding trailing blanks.
strchrcp Replaces part of a string with copies of another string.
strchrin Inserts copies of a string into another string.
strclpl Clips a number of characters from the beginning of a string.
strclpr Clips a number of characters from the ending of a string.
strcpy Replaces part of a string with a substring.
strdel Deletes a number of characters from a specific spot in a string.
strins Inserts a substring into another string.
strpadl Pads a string with leading blanks until the string is a certain size.
strpadr Pads a string with trailing blanks until the string is a certain size.
strraw Exports array data to a delimiter-separated string.
strrep Returns a string, replacing a specified character sequence with another string.
strtrml Removes all leading blanks from a string.
strtrmr Removes all trailing blanks from a string.
substr Returns a string from a portion of a string.
substrb Extracts a substring from a multibyte character or binary string.
sysinfo.get(“ActiveFloatUsers”) Returns the total number of currently active floating users.
sysinfo.get(“ActiveLicenses”) Returns the total number of currently active licenses.
sysinfo.get(“ActiveNamedUsers”) Returns the total number of currently active named users.
sysinfo.get("AuthMode") Returns the authentication mode of the current user.
sysinfo.get(“ClientNetAddress”) Returns the Service Manager client network IP address as a character string.
sysinfo.get(“ClientOSName”) Returns the name of the operating system that Service Manager is running on.
sysinfo.get(“ClientPID”) Returns the PID for RAD.
sysinfo.get(“ClientVersion”) Returns the version number of the client software as a string.
sysinfo.get(“Display”) Returns “GUI” or “text”, depending on the type of client that is running.
sysinfo.get(“Environment”) Returns the name of the environment in which the client is operating.
sysinfo.get(“languagecode”) Returns the server session language code value that is used for localized forms and messages.
sysinfo.get(“MaxFloatUsers”) Returns the total number of floating users logged on since the server started.
sysinfo.get(“MaxLicenses”) Returns the maximum number of licenses used since the server started.
sysinfo.get(“Mode”) Returns a value that states the type of client being used.
sysinfo.get(“PrevLabel”) Returns the label name of the last RAD panel that was executed.
sysinfo.get(“PrintOption”) Returns printing option information, “server” or “client” depending on how the system is set.
sysinfo.get(“Quiesce”) Returns “true” if system is quiesced and “false” if system is not quiesced.
sysinfo.get(“RecList”) Returns “true” if record list is enabled and “false” if record list is disabled.
sysinfo.get(“ServerNetAddress”) Returns the Service Manager server network IP address as a character string.
sysinfo.get(“ServerNetPort”) Returns the Service Manager server port used by the connected client or the system name when called by a background process.
sysinfo.get(“ServerPID”) Returns the PID of the server as a number.
sysinfo.get(“Telephony”) Returns “true” if telephony is enabled and “false” if telephony is disabled.
sysinfo.get(“ThreadID”) Returns the number of the current RAD thread.
sysinfo.get(“TotalFloatUsers”) Returns the total number of floating users allowed.
sysinfo.get(“TotalLicenses”) Returns the total number licenses allowed.
sysinfo.get(“TotalNamedUsers”) Returns the total number of named users allowed.
sysinfo.get(“TotalProcs”) Returns the total number of executing system and user tasks.
sysinfo.get(“TotalSystemProcs”) Returns the total number of system tasks.
sysinfo.get(“TotalUserProcs”) Returns the total user tasks.
time Returns the time portion of a date/time variable.
tod Returns the current date and time.
tolower Returns a string, replacing upper-case letters with lower-case letters.
toupper Returns a string, replacing lower-case letters with upper-case letters.
translate Returns a string translated from one character set to another.
trunc Truncates the decimal digit number to a specified number of digits.
type Returns the numeric type of its argument.
updatestatus Returns the result of the last update operation on a Service Manager file.
val Returns a non-string data type converted from a string.
version Returns a list of version information.
year Returns the full year for a date regardless of the date format.