GetSubstitution method: Exception class
Syntax
GetSubstitution(Index)
Description
When you create a message in the message catalog, you can specify values in the message text, such as %1, %2, and so on, that are replaced with values by the system at runtime. The value that gets put into the message text value is called the substitution string. The GetSubstitution method returns the substitution string in the error message specified by Index, with 1 being the first substitution string, 2 being the second, and so on.
Parameters
| Parameter | Description |
|---|---|
|
Index |
Specify the substitution string number that you'd like to return. The first one is 1, the second is 2, and so on. You must specify a valid substitution string number, that is, you can't specify a 4 if there are only three substitution strings. |
Returns
The substitution text as a string.
Example
If &Ex1.MessageSetNumber = 2 and &Ex1.MessageNumber = 170 Then
/* Get Sendmail error */
&String = &Ex1.GetSubstitution(1);
/* do processing according to type of Sendmail error */
. . . .
End-if;