RAD function: 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.

Function

scmsg

Format

scmsg($id, $class, $arrayof values)

Parameters

The following parameters are valid for the scmsg function:

Parameter Data type Description
$id Number The ID number of the message (message.id) from the scmessage table.
$class String The Message class from the scmessage table.
$arrayofvalues Array An array of substitution text for the %S variables in the message text from the scmessage table.

Factors

  • All substitution text must be %S, which indicates that a string is used to provide the data. Each entry in the array of substitution text is examined for the type. If it is not a string type, it is converted to a string.
  • You must create a separate record in the scmessage table for the message in each language you want to display.
  • The $arrayofvalues defined in the scmsg function are applied to the message in the scmessage table corresponding to the language defined for the client login.

Example

scmsg("21", "cib", {"mail", "middle,caller.id", "open"})

Resulting message from the scmessage table:

Built macro to %S to %S on %S.

When the %S array values from the scmsg function in the example are applied, the message is displayed as:

Built macro to mail to middle,caller.id on open