# PeopleCode Built-in Functions and Language Constructs: R

The PeopleCode built-In functions and language constructs beginning with the letter R are listed in alphabetical order within this topic.

### Syntax

`Radians(angle)`

### Description

Use the Radians function to convert the given angle from degree measurement to radian measurement.

### Parameters

Field or Control

Definition

angle

The size of an angle in degrees.

### Returns

The size of the given angle in radians.

### Example

The following example returns the equivalent size in radians of an angle measuring 65.5 degrees:

``&RADIAN_SIZE = Radians(65.5);``

The following example returns the value of pi, that is, 180 degrees expressed as radians:

``&PI = Radians(180);``

Note: This example represents pi with a high degree of accuracy, but no computer system can represent irrational numbers exactly. Thus, the results of extended calculations based on pi have the potential for a cumulative reduction in precision.

### Syntax

`Rand( )`

### Description

Use the Rand function to generate a random number greater than or equal to 0 and less than 1. To generate a random integer that is greater than or equal to 0 but less than x, use `Int(Rand()*x)`.

### Returns

Returns a random Number value greater than or equal to 0 and less than 1.

### Example

The example sets &RANDOM_NUM to a random value less than 100.

``&RANDOM_NUM = Int(Rand( )*100)``

### Syntax

The syntax of the RecordChanged function varies, depending on whether you use a scroll path reference or a contextual reference to designate the row being tested.

Using a scroll path reference, the syntax is:

`RecordChanged(scrollpath, target_row)`

where scrollpath is:

`[RECORD.level1_recname, level1_row, [RECORD.level2_recname, level2_row,]] RECORD.target_recname`

To prevent ambiguous references, you can also use SCROLL. scrollname, where scrollname is the same as the scroll level’s primary record name.

Using a contextual reference the syntax is:

`RecordChanged(RECORD.target_recname)`

A contextual reference specifies the current row on the scroll level designated by RECORD. target_recname.

An older construction, in which a record field expression is passed, is also supported. The record field is any field in the row where the PeopleCode program is executing (typically the one on which the program is executing).

`RecordChanged(recordname.fieldname)`

### Description

Use the RecordChanged function to determine whether the data in a specific row has been modified since it was retrieved from the database either by the user or by a PeopleCode program.

Note: This function remains for backward compatibility only. Use the IsChanged record class property instead.

This is useful during save processing for making updates conditional on whether rows have changed.

Note: The word "record" is used in this function name in a misleading way. Remember that this function (like the related functions RecordDeleted and RecordNew) checks the state of a row, not a record.

### Parameters

Field or Control

Definition

scrollpath

A construction that specifies a scroll level in the component buffer.

RECORD .target_recname

The primary scroll record of the scroll level where the row being referenced is located. As an alternative, you can use SCROLL. scrollname.

### Returns

Returns a Boolean value:

• True if any data in the target row has been changed.

• False if no data in the target row has been changed.

### Example

This example shows a RecordChanged call using a contextual reference:

``````If RecordChanged(RECORD.BUS_EXPENSE_DTL) Then
WinMessage("Changed row msg from current row.", 64);
End-If;``````

The following example, which would execute on level one, checks rows on level two to determine which have been changed:

``````For &I = 1 To ActiveRowCount(RECORD.BUS_EXPENSE_PER, CurrentRowNumber(1), RECORD.BUS_EXPENSE_DTL);
If RecordChanged(RECORD.BUS_EXPENSE_PER, CurrentRowNumber(1), RECORD.BUS_EXPENSE_DTL, &I) Then
WinMessage("Changed row message from level one.", 64);
End-If;
End-For;``````

### Syntax

The syntax of the RecordDeleted function varies, depending on whether you use a scroll path reference or a contextual reference to designate the row being tested.

Using a scroll path reference, the syntax is:

`RecordDeleted(scrollpath, target_row)`

where scrollpath is:

`[RECORD.level1_recname, level1_row, [RECORD.level2_recname, level2_row,]] RECORD.target_recname`

To prevent ambiguous references, you can also use SCROLL. scrollname, where scrollname is the same as the scroll level’s primary record name.

Using a contextual reference the syntax is:

`RecordDeleted(RECORD.target_recname)`

A contextual reference specifies the current row on the scroll level designated by RECORD. target_recname.

An older construction, in which a record field expression is passed, is also supported. The record field is any field in the row where the PeopleCode program is executing (typically the one on which the program is executing).

`RecordDeleted(recordname.fieldname)`

### Description

Use the RecordDeleted function to verify if a row of data has been marked as deleted, either by an end-user row delete (F8) or by a call to DeleteRow.

Note: This function remains for backward compatibility only. Use the IsDeleted record class property instead.

RecordDeleted is useful during save processing to make processes conditional on whether a row has been deleted.

Deleted rows are not actually removed from the buffer until after the component has been successfully saved, so you can check for deleted rows all the way through SavePostChange PeopleCode.

RecordDeleted is not typically used in a loop, because it is easier to put it on the same scroll level as the rows being checked in SavePreChange or SavePostChange PeopleCode: these events execute PeopleCode on every row in the scroll, so no looping is necessary.

Note: To avoid confusion, note that this function (like the related functions RecordChanged and RecordNew) checks the state of a row, not a record.

### Parameters

Field or Control

Definition

scrollpath

A construction that specifies a scroll level in the component buffer.

RECORD. target_recname

The primary scroll record of the scroll level where the row being referenced is located. As an alternative, you can use SCROLL. scrollname.

### Returns

Returns a Boolean value:

• True if the target row has been deleted.

• False if the target row has not been deleted.

### Example

This example shows a RecordDeleted call using a contextual reference

``````If RecordDeleted(RECORD.BUS_EXPENSE_DTL) Then
WinMessage("Deleted row msg from current row.", 64);
End-If;``````

The following example, which would execute on level zero, checks rows on level one to determine which have been deleted:

``````For &I = 1 To TotalRowCount(RECORD.BUS_EXPENSE_PER, CurrentRowNumber(1), RECORD.BUS_EXPENSE_DTL);
If RecordDeleted(RECORD.BUS_EXPENSE_PER, CurrentRowNumber(1), RECORD.BUS_EXPENSE_DTL, &I) Then
WinMessage("Deleted row message from level one.", 64);
End-If;
End-For;``````

Note that the loop is delimited by TotalRowCount. For loops delimited by ActiveRowCount don’t process deleted rows.

### Syntax

The syntax of the RecordNew function varies, depending on whether you use a scroll path reference or a contextual reference to designate the row being tested.

Using a scroll path reference, the syntax is:

`RecordNew(scrollpath, target_row)`

where scrollpath is:

`[RECORD.level1_recname, level1_row, [RECORD.level2_recname, level2_row,]] RECORD.target_recname`

To prevent ambiguous references, you can also use SCROLL. scrollname, where scrollname is the same as the scroll level’s primary record name.

Using a contextual reference the syntax is:

`RecordNew(RECORD.target_recname)`

A contextual reference specifies the current row on the scroll level designated by RECORD. target_recname.

An older construction, in which a record field expression is passed, is also supported. The record field is any field in the row where the PeopleCode program is executing (typically the one on which the program is executing).

`RecordNew(recordname.fieldname)`

### Description

Use the RecordNew function to check a specific row to determine whether it was added to the component buffer since the component was last saved.

Note: This function remains for backward compatibility only. Use the IsNew row class property instead.

This function is useful during save processing to make processes conditional on whether or not a row is new.

Note: To avoid confusion, remember that this function (like the related functions RecordChanged and RecordDeleted) checks the state of a row, not a record. In normal PeopleSoft usage, the word "record" denotes a table-level object (such as a table, view, or Derived/Work record).

### Parameters

Field or Control

Definition

scrollpath

A construction that specifies a scroll level in the component buffer.

RECORD. target_recname

The primary scroll record of the scroll level where the row being referenced is located. As an alternative, you can use SCROLL. scrollname.

### Returns

Returns a Boolean value:

• True if the target row is new.

• False if the target row is not new.

### Example

This example shows a RecordNew call using a contextual reference:

``````If RecordNew(RECORD.BUS_EXPENSE_DTL) Then
WinMessage("New row msg from current row.", 64);
End-If;``````

The following example, which would execute on level one, checks rows on level two to determine which have been added:

``````For &I = 1 To ActiveRowCount(RECORD.BUS_EXPENSE_PER, CurrentRowNumber(1), RECORD.BUS_EXPENSE_DTL);
If RecordNew(RECORD.BUS_EXPENSE_PER, CurrentRowNumber(1), RECORD.BUS_EXPENSE_DTL, &I) Then
WinMessage("New row message from level one.", 64);
End-If;
End-For;``````

### Syntax

`RefreshTree(Record.bound_recname)`

### Description

Use the RefreshTree function to update a dynamic tree.

Note: Dynamic tree controls have been deprecated. Use the GenerateTree function or Tree Viewer.

### Syntax

`RelNodeTranDelete(RelationshipId , SrcTrxType, SrcNode, SrcRqstMsgName, SrcRqstMsgVer, TgtNode, TgtRqstMsgName, TgtRqstMsgName, TgtRqstMsgVer)`

### Description

Use the RelNodeTranDelete function to delete a transaction modifier.

### Parameters

Field or Control

Definition

RelationshipId

Specify the relationship ID as a string.

ScrTrxType

Specify the source transaction type as a string.

SrcNode

Specify the source node as a string.

ScrRqstMsgName

Specify the source request message name as a string.

ScrRqstMsgVer

Specify the source request message version as a string.

TgtNode

Specify the target node as a string.

TgtRqstMsgName

Specify the target request message name as a string.

TgtRqstMsgName

Specify the target message name as a string.

TgtRqstMsgVer

Specify the target request message version as a string.

### Returns

A Boolean value, True if the function completed successfully, False otherwise.

### Example

``&ret = RelNodeTranDelete("QE_TEST", "CMS_TEST", "CMS_TEST_LOCAL", "OA",  "ROLESYNCH_MSG",  "VERSION_1", "CMS_TEST_LOCAL2",   "ROLESYNCH_MSG2",  "VERSION_1",);``

### Syntax

`RemoteCall(dispatcher_name [, service_paramlist] [, user_paramlist])`

where service_paramlist and user_paramlist are arbitrary-length lists of parameters in the form:

`var1, val1 [, var2, val2]. . .`

### Description

Use the RemoteCall function to call a Tuxedo service from a PeopleSoft application. A typical use of Remote Call is to run data-intensive, performance-sensitive programs near or on the database server.

Note: After PeopleTools 8 you can no longer use RemoteCall to start an Application Engine program. You must use CallAppEngine instead.

Because complex PeopleCode processes can now be run on the application server in three-tier mode, the RemoteCall PeopleCode function has more limited utility. However, RemoteCall can still be very useful, because it provides a way to take advantage of existing COBOL processes.

• In three-tier mode, RemoteCall always runs on the application server.

• In two-tier mode, RemoteCall always runs on the client.

This means that it is no longer necessary to set a location for the remote call in PeopleSoft Configuration Manager.

Each RemoteCall service can have zero or more standard parameters and any number of user parameters. The standard parameters are determined by the RemoteCall dispatcher, the user parameters by the COBOL program being run.

There is only one RemoteCall dispatcher delivered with PeopleTools 7, PSRCCBL, which executes a COBOL program using the connect information of the current end user.

In the application server configuration file, you can specify where RemoteCall can find the COBOL executables

RemoteCall can be used from any type of PeopleCode except SavePostChange, SavePreChange, Workflow, and RowSelect. However, remote programs that change data should not be run as part of the SaveEdit process, because the remote program may complete successfully even though an error occurs in a later part of the save process. For remote programs that change data, the normal place for them would be in the FieldChange PeopleCode behind a command push button, or in a pop-up menu item.

After you use RemoteCall, you may want to refresh your page. The Refresh method, on a rowset object, reloads the rowset (scroll) using the current page keys. This causes the page to be redrawn. The following code refreshes the entire page:

``GetLevel0().Refresh() ``

If you only want a particular scroll to be redrawn, you can refresh just that part.

### Parameters

The parameters passed to RemoteCall can be broken into three parts: the RemoteCall Dispatcher Name, the standard Parameter Lists for the service, and the User Parameter Lists for the program being called on the service.

#### Dispatcher Name

The dispatcher_name parameter is a string value that specifies the type of RemoteCall performed. For PeopleTools 7 there is only one RemoteCall dispatcher delivered, PSRCCBL, which executes a COBOL program using the connect information of the current end user, so the value you pass to this parameter should always be "PSRCCBL". Future versions of PeopleTools may provide support for Red Pepper, SQR, or customer supplied remote calls.

#### Parameter Lists

Both the standard parameter list and user parameter list have the same form. Think of the parameters passed to the service as being passed as pairs of variable names and values of input and output parameters:

``variable_name, value``

Where:

• variable_name is a string literal or string variable that contains the name of the input or output variable as referenced in the remote program. For example, if the remote program expects a variable named "USERNAME", then the PeopleCode should use "USERNAME" or &VARIABLE (which had been assigned the value "USERNAME").

• For input variables, value is the value to be passed to the remote program with the variable name. It can be either a variable or literal with a data type that corresponds to the variable_name variable. For output variables, value is the value returned to the PeopleCode program from the remote program. It must be a variable in this case, representing the buffer into which the value is returned.

An arbitrary number of parameters can be passed to the service. There is, however, a limitation on the number of variables that can be passed in PeopleCode, which is limited by the size of the PeopleCode parameter stack, currently 128.

In the case of the PSRCCBL dispatcher, there are three standard parameters, listed in the following table:

Dispatcher

Parameter

Required

Description

PSRCCBL

PSCOBOLPROG

Y

Name of the COBOL program to run.

PSRCCBL

PSRUNCTL

N

Run-control parameter to pass to the COBOL program.

PSRCCBL

INSTANCE

N

Process instance parameter to pass to the COBOL program.

#### User Parameter List

For PSRCCBL, the remote COBOL program must match the user parameters to the usage of its application. The names of the parameters are sent to the server and can be used by the COBOL program. The COBOL program returns any modified (output) parameters by name. Parameters which are not returned are not modified, and any extra returned parameters (that is, parameters beyond the number passed or of different names) are discarded with no effect.

None.

### Example

You could use the following PeopleCode to execute the program "CBLPROG1":

``````Rem Set the return code so we are sure it is sent back.
&Returncode = -1;
Rem Set the parameters that will be sent across.
&param1 = "John";
&param2 = "Smith";
Rem Set the standard parameters that indicate program name and run-control.
&RemoteCobolPgm = "CBLPROG1";
/* call the remote function */
RemoteCall ("PSRCCBL",
"PSCOBOLPROG", &RemoteCobolPgm,
"PSRUNCTL", workrec.runctl,
"FirstName", &param1,
"LastName", &param2,
"Returncode", &Returncode,
"MessageSet", &msgset,
"MessageID", &msgid,
"MessageText1", &msgtext1,
"MessageText2", &msgtext2);
if &Returncode <> 0
WinMessage(MsgGet(&msgset, &msgid, "default message", &msgtext1, &msgtext2));
end-if;``````

### Syntax

`RemoveDirectory(path [, remove_parameters])`

where remove_parameters can be in the form:

`path_type [+ directory_type]`

### Description

Use the RemoveDirectory function to remove the directory specified by path. You can also specify whether to remove just the directory, or to delete the directory and all subdirectories, including any files, that is, to remove the entire directory tree.

### Parameters

Field or Control

Definition

path

Specify the directory to be removed.

remove_parameters

Specify whether the path is an absolute or relative path. Values are:

• %FilePath_Relative (default)

• %FilePath_Absolute

The default is %FilePath_Relative.

If you specify a relative path, that path is appended to the path constructed from a system-chosen environment variable. A complete discussion of relative paths and environment variables is provided in documentation on the File class.

If the path is an absolute path, whatever path you specify is used verbatim. You must specify a drive letter as well as the complete path. You can’t use any wildcards when specifying a path.

The Component Processor automatically converts platform-specific separator characters to the appropriate form for where your PeopleCode program is executing. On a Windows system, UNIX "/" separators are converted to "\", and on a UNIX system, Windows "\" separators are converted to "/".

Note: The syntax of the file path does not depend on the file system of the platform where the file is actually stored; it depends only on the platform where your PeopleCode is executing.

Specify whether to remove only the specified directory or to remove the directory and all its subdirectories. The default is to just remove the specified directory.

The valid values are:

• %Remove_Subtree

• %Remove_Directory (default)

None.

### Example

The following example is for a Windows operating system:

``RemoveDirectory("C:\temp\mydir\temp", %filepath_absolute + %remove_subtree);``

The following example is for a UNIX operating system:

``RemoveDirectory("/temp/mydir/temp", %filepath_absolute + %remove_subtree);``

### Syntax

`RenameDBField(Field.NewFieldName, Field.OldFieldName [, FixRefsOnly])`

### Description

Use the RenameDBField function to modify a field definition to have a new name. This function also cleans up most references, such as in PeopleCode programs and on records so they now use the new name.

Note: Because using this function changes records that are used to build application tables, you must rebuild (alter) the specified project before these changes can be used.

#### Considerations Using this Function

In SQL associated with records of type view, the field name is not changed. You must fix those by hand.

This function is intended for use during configuration time only, before active runtime usage is initiated. Using this function during active runtime is not supported. Changes to data definitions are not recognized on currently loaded component. In general, changes aren't recognized until the component is reloaded.

This operation is time consuming.

Warning! These operations take place in a separate transaction from the page's save status: the initiation of any of these operations immediately changes the definitions, even if the page is subsequently cancelled.

### Parameters

Field or Control

Definition

NewFieldName

Specify the new field name to be used. This name must be prefixed by the reserved word Field.

OldFieldName

Specify the name of the field to be changed. This name must be prefixed by the reserved word Field.

FixRefsOnly

Specify to rename all references of OldFieldName to NewFieldName whether or not NewFieldName exists or not. This paramter takes a Boolean value. The default value is False.

For example, suppose a company renames a field PROJECT to MYPROJECT. Then they receive a patch which has records, pages, code, and so on that references Field.PROJECT. In this case you could set this parameter to True, rename MYPROJECT to PROJECT, and have all the references to the field PROJECT redirect to the field MYPROJECT even if neither field exists in the database, nor if only one exists.

Note: Using this parameter is a completely freeform path to renaming references. Be aware that the system won't work if pages and records are not eventually pointing to a valid field.

### Returns

A constant value. The values are:

Value

Description

%MDA_Success

Bulk operation completed successfully.

%MDA_Failure

Bulk operation did not complete successfully.

%MDA_FieldNotFound

The field specified by OldFieldName wasn't found in the specified project or page list.

%MDA_Duplicate

The field specified by NewFieldName already exists.

### Example

``````&ret = RenameDBField(Field.OrgId, Field.DeptId, True);
If (&ret = %MDA_Success) Then
MessageBox(0, "Metadata Fn Status", 0, 0, "RenameDBField succeeded");
Else
MessageBox(0, "Metadata Fn Status", 0, 0, "RenameDBField failed");
End-If;``````

The following example de-references the field name for the function.

``````&oldcf = "CF1";
&newcf = "XYZ_STORE_ID";
&new = "FIELD." | &newcf;
&old = "FIELD." | &oldcf;
&ret = RenameDBField(@(&new), @(&old));
If (&ret = 0) Then
MessageBox(0, "RenameDBField", 0, 0, "Succeeded");
Else
MessageBox(0, "RenameDBField", 0, 0, "Failed");
End-If;``````

### Syntax

`RenamePage(Page.NewPageName, Page.OldPageName)`

### Description

Use the RenamePage function to modify a page definition to have a new name. This function also cleans up most references so they now use the new name.

#### Considerations Using this Function

This function is intended for use during configuration time only, before active runtime usage is initiated. Using this function during active runtime is not supported. Changes to data definitions are not recognized on currently loaded component. In general, changes aren't recognized until the component is reloaded.

This operation is time consuming

Warning! These operations take place in a separate transaction from the page's save status: the initiation of any of these operations immediately changes the definitions, even if the page is subsequently cancelled.

### Parameters

Field or Control

Definition

NewPageName

Specify the new page name to be used. This name must be prefixed by the reserved word Page.

OldPageName

Specify the name of the page to be changed. This name must be prefixed by the reserved word Page.

### Returns

A constant value. The values are:

Value

Description

%MDA_Success

Bulk operation completed successfully.

%MDA_Failure

Bulk operation did not complete successfully.

%MDA_PageNotFound

The page specified with OldPageName wasn't found.

### Example

``````&ret =  RenamePage(PAGE.OrgIdTbl, PAGE.DeptIdTbl);
If (&ret = %MDA_Success) Then
MessageBox(0, "Metadata Fn Status", 0, 0, "RenamePage succeeded");
Else
MessageBox(0, "Metadata Fn Status", 0, 0, "RenamePage failed");
End-If;``````

### Syntax

`RenameRecord(Record.NewRecordName, Record.OldRecordName)`

### Description

Use the RenameRecord function to modify a record definition to have a name. This function also cleans up most references so they now use the new name.

Note: Because using this function changes records that are used to build application tables, you must rebuild (alter) the specified project before these changes can be used.

#### Considerations Using this Function

This function is intended for use during configuration time only, before active runtime usage is initiated. Using this function during active runtime is not supported. Changes to data definitions are not recognized on currently loaded component. In general, changes aren't recognized until the component is reloaded.

This operation is time consuming.

Warning! These operations take place in a separate transaction from the page's save status: the initiation of any of these operations immediately changes the definitions, even if the page is subsequently cancelled.

### Parameters

Field or Control

Definition

NewRecordName

Specify the new record name to be used. This name must be prefixed by the reserved word Record.

OldRecordName

Specify the name of the record to be changed. This name must be prefixed by the reserved word Record.

### Returns

A constant value. The values are:

Value

Description

%MDA_Success

Bulk operation completed successfully.

%MDA_Failure

Bulk operation did not complete successfully.

%MDA_RecordNotFound

The record specified with OldRecordName wasn't found.

### Example

``````&ret = RenameRecord(RECORD.OrgIdTbl, RECORD.DeptIdTbl);
If (&ret = %MDA_Success) Then
MessageBox(0, "Metadata Fn Status", 0, 0, "RenameRecord succeeded");
Else
MessageBox(0, "Metadata Fn Status", 0, 0, "RenameRecord failed");
End-If;``````

### Syntax

```Repeat
statement_list
Until logical_expression```

### Description

Use the Repeat loop to cause the statements in statement_list to be repeated until logical_expression is True. Any kind of statements are allowed in the loop, including other loops. A Break statement inside the loop causes execution to continue with whatever follows the end of the loop. If the Break is in a nested loop, the Break does not apply to the outside loop.

### Example

The following example repeats a sequence of statements until a complex Boolean condition is True:

``````Repeat
&J = &J + 1;
&ITEM = FetchValue(LOT_CONTROL_INV.INV_ITEM_ID, &J);
&LOT = FetchValue(LOT_CONTROL_INV.INV_LOT_ID, &J);
Until (&ITEM = &INV_ITEM_ID And &LOT = &INV_LOT_ID) Or &J = &NUM_LOT_ROWS;``````

### Syntax

`Replace(oldtext, start, num_chars, newtext)`

### Description

Use the Replace function to replace a specified number of characters in a string.

### Parameters

Field or Control

Definition

oldtext

A String value, part of which is to be replaced.

start

A Number designating the position in oldtext from which to start replacing characters.

num_chars

A Number, specifying how many characters to replace in oldtext.

newtext

A String value that replaces num_chars characters.

### Returns

Returns a String value in which specific characters in oldtext are replaced with newtext.

### Example

After the following statement &NEWDATESTR equals "1997":

``````&NEWDATESTR = Replace("1996",3,2,"97");
``````

If this example, where the number of characters in newtext is less than num_chars, &SHORTER equals "txtx":

``&SHORTER = Replace("txt123",4,3,"x");``

In this example, where the number of characters in newtext is greater than num_chars, &LONGER equals "txtxxxx":

``&LONGER = Replace("txt123",4,3,"xxxx");``

### Syntax

`Rept(str, reps)`

### Description

Use the Rept function to replicate a text string a specified number of times and combine the result into a single string.

### Parameters

Field or Control

Definition

str

A String value to be replicated.

reps

A Number value specifying how many times to replicate str. If reps is 0, Rept returns an empty string. If reps is not a whole integer, it is truncated.

### Returns

Returns a String value equal to str repeated reps times.

### Example

This example sets &SOMESTARS to "**********".

``&SOMESTARS = Rept("*",10);``

### Syntax

`ResizeImage(URL.source_URL, URL.dest_URL, array_of_sizes [, type][, aspect_ratio])`

### Description

Use the ResizeImage function to create one or more resized copies of the source image. Depending on the image source, ResizeImage supports the following image formats only:

• Record field: BMP and JPEG.

• File system folder: BMP, GIF, JPEG, and PNG.

The resized images can be created in file system folder or in a database table. When the destination location is a file system folder, then the name of the resized image is created from the source image file name along with the resize dimensions. For example, if file1.jpg is resized to 40 x 60 pixels, then the resulting file name would be file14060.jpg. If the same file is resized to 10%. the resulting file name would be file110.jpg.

When a database table is specified as the destination location, the PS_PT_IMG_TMPSTORE table is used to temporarily store the images instead of the specified database table. Using the return code of the function invocation as a key value, your application must retrieve the resized images from the PS_PT_IMG_TMPSTORE table.

Column Name

Data Type

Description

PT_IMG_UUID*

Nbr

The return value of the ResizeImage method. All the resized images stored in database for a specific invocation are stored with this identifier.

PT_IMG_FILESEQNO*

Nbr

The sequence number for multiple resizings of the same source image file.

PT_IMG_WIDTH*

Nbr

The image width in pixels.

PT_IMG_HEIGHT*

Nbr

The image height in pixels.

PT_IMG_IMGNAME

Char

The file name of the source image.

PT_IMG_IMGDATA

Long

The image data for the re-sized image.

PSIMAGEVER

Nbr

The image version.

LAST_UPDATE_DTTM

DtTm

The last update timestamp.

OPRID

Char

The operator ID

* Represents a key field. The composite key for a specific resized image would consist of: PT_IMG_UUID + PT_IMG_FILESEQNO + PT_IMG_WIDTH + PT_IMG_HEIGHT + PT_IMG_IMGNAME.

Three image manipulation testing pages provide a sample application that allows an administrator to predefine resize dimensions (Image Size page), predefine groupings of dimensions (Image Group page), and then test the usage of these predefined groups for resizing images (Test Utility page). See Image Manipulation Testing Utilities for more information.

### Parameters

Field or Control

Definition

URL.source_URL

Specifies the location of the source image (or images) as a URL object. The source location can be either a database record or a folder on the application server’s file system containing one or more image files.

When the URL object specifies a database record, you must define three URL properties: to specify the column name from which image data has to be read (), the column name from which the image name has to be taken (), and destination image type ().

• IMG_DATA_COLUMN: The record field containing the image.

• IMG_NAME_COLUMN: The record field containing the name of the image.

• IMG_FILE_FORMAT: The record field specifying the image format. This field serves as a filter, and only images of the specified format are resized.

Note: If the source record includes more than one row of data, then the IMG_FILE_FORMAT field is ignored.

URL.dest_URL

Specifies the location of the resized image (or images) as a URL object. The destination location can be either a database record or a folder on the application server’s file system.

Important! When the destination location is specified as a database record, the PS_PT_IMG_TMPSTORE table is used to temporarily store the images instead of the specified record. Using the return code of the function invocation as a key value, your application must retrieve the resized images from the PS_PT_IMG_TMPSTORE table. See the “Description” for more information on using the PS_PT_IMG_TMPSTORE table.

array_of_sizes

Specifies resize dimensions as an array of integer. The contents of the array are retrieved in pairs or one-by-one depending on the value of the type parameter. In addition, the array must be terminated with two 0s or one 0, depending on the type parameter.

• If type is 0 (%Resize_ByDimensions), the values in the array are retrieved in pairs representing the width and height (in pixels) of the resize dimensions. Terminate the array with two 0s. For example, the following array would resize the images to 20x20 pixels, 80x100 pixels, and to a width of 40 pixels maintaining the source images’ aspect ratio:

``&resize_array = CreateArray(20, 20, 80, 100, 40, 0, 0, 0);``
• If type is 1 (%Resize_ByPercentage), the values in the array are retrieved one-by-one representing the percentage to resize the images. Terminate the array with a single 0. For example, the following array would resize the images to 10% and 50%:

``&resize_array = CreateArray(10, 50, 0);``

Important! Oracle recommends that you do not resize images to dimensions larger than the original size or to a percentage larger than 100%.

type

Specifies an optional numeric value indicating how to retrieve the values from the array_of_sizes array:

• %Resize_ByDimensions (0) – The values in the array are retrieved in pairs representing the width and height (in pixels) of the resize dimensions.

• %Resize_ByPercentage (1) – The values in the array are retrieved one-by-one representing the percentage to resize the images.

aspect_ratio

Specifies an optional Boolean value indicating whether to maintain the aspect ratio of the source image:

• If aspect_ratio is True and either the height or width is 0, the aspect ratio of the source image is maintained. Otherwise, if both height and width are non-zero values, then aspect_ratio is ignored and the image is resized to the specified aspect ratio.

• If aspect_ratio is False, then a resize is performed only if both height and width are non-zero values. Otherwise, if either the height or width is 0, no resize is performed.

True is the default value. In addition, the aspect_ratio parameter is ignored when the type parameter is 1 (%Resize_ByPercentage).

### Returns

An Integer value representing the unique identifier for the resize invocation. A negative number indicates that the function terminated with an error.

### Example

In the following example, a Resize method is defined to invoke the ResizeImage function. The source and destination URLs are passed into the method and then on to the function invocation. The third input parameter to the method is a group of predefined sizes. These predefined sizes are retrieved from a table and are converted into the &ImgDimensions array, which is the third required input parameter to the ResizeImage function.

``````method Resize
/+ &SourceImgPath as String, +/
/+ &DestImagPath as String, +/
/+ &ImgGroupDefn as String +/
/+ Returns Number +/

Local number &retcode;
Local Rowset &RS1, &RS2;
Local Record &REC_IMGGROUP, &REC_SIZEDEFN;
Local string &ImgSizeName;
Local number &I, &width, &height;
Local array of number &ImgDimensions;
&ImgDimensions = CreateArray(0);

&RS1 = CreateRowset(Record.PT_IMG_IMGGROUP);
&RS1.Fill("where PT_IMG_GROUPNAME = :1", &ImgGroupDefn);

Local Row &dimrow;

For &I = 1 To &RS1.ActiveRowCount
&dimrow = &RS1.GetRow(&I);
&ImgSizeName = &dimrow.PT_IMG_IMGGROUP.PT_IMG_SIZENAME.Value;

SQLExec("SELECT PT_IMG_WIDTH, PT_IMG_HEIGHT FROM PS_PT_IMG_SIZEDEFN WHERE PT_IMG_SIZENAME = :1", &ImgSizeName, &width, &height);

&ImgDimensions.Push(&width);
&ImgDimensions.Push(&height);
End-For;

If Exact(Left(&SourceImgPath, 4), "URL.") Then
If Exact(Left(&DestImagPath, 4), "URL.") Then
&retcode = ResizeImage(@(&SourceImgPath), @(&DestImagPath), &ImgDimensions);
Else
&retcode = ResizeImage(@(&SourceImgPath), &DestImagPath, &ImgDimensions);
End-If
Else
If Exact(Left(&DestImagPath, 4), "URL.") Then
&retcode = ResizeImage(&SourceImgPath, @(&DestImagPath), &ImgDimensions);
Else
&retcode = ResizeImage(&SourceImgPath, &DestImagPath, &ImgDimensions);
End-If
End-If;

Return &retcode;

end-method;``````

### Syntax

`ReSubmitPubHeaderXmlDoc(PubID, PubNode, ChannelName, VersionName)`

### Description

Use the ReSubmitPubHeaderXmlDoc function to programmatically resubmit a message instance, as the message instance existed before any transformations were performed, much the same as you can do in the message monitor. This function resubmits the corresponding publication contract header.

Note: This function has been deprecated and remains for backward compatibility only. Use the IntBroker class Resubmit method instead.

You may want to use this method after an end user has finished fixing any errors in the message data, and you want to resubmit the message, rerunning the PeopleCode.

The function is only available when the XML message has one of the following statuses:

• Error

• Timeout

• Edited

• Canceled

### Parameters

Field or Control

Definition

PubID

Specify the PubID as a number.

PubNode

Specify the Pub node as a string.

ChannelName

Specify the channel name as a string.

VersionName

Specify the version name as a string.

### Returns

A Boolean value: True if function completed successfully, False otherwise.

### Syntax

`ReSubmitPubXmlDoc(PubID, PubNode, ChannelName, VersionName, MessageName, SubNode[, Segment])`

### Description

Use the ReSubmitPubXmlDoc function to programmatically resubmit a message, much the same as you can do in the message monitor.

Note: This function has been deprecated and remains for backward compatibility only. Use the IntBroker class Resubmit method instead.

This is the message publication as it exists after any transformations have been preformed. This function resubmits the corresponding publication contract.

You may want to use this method after an end user has finished fixing any errors in the message data, and you want to resubmit the message, rerunning the PeopleCode.

The function is only available when the message has one of the following statuses:

• Error

• Timeout

• Edited

• Canceled

### Parameters

Field or Control

Definition

PubID

Specify the PubID as a number.

PubNode

Specify the Pub node as a string.

ChannelName

Specify the channel name as a string.

VersionName

Specify the version name as a string.

MessageName

Specify the name of the message as a string.

SubNode

Specify the name of the sub node as a string.

Segment

Specify an integer representing which segment you want to access. The default value is one, which means that if you do not specify a segment, the first segment is accessed.

### Returns

A Boolean value: True if function completed successfully, False otherwise.

### Syntax

`ReSubmitSubXmlDoc(PubID, PubNode, ChannelName, VersionName, MessageName, SubscriptionName[, Segment])`

### Description

Use the ReSubmitSubXmlDoc function to programmatically resubmit a message, much the same as you can do in the message monitor. This function resubmits the corresponding subscription contract.

Note: This function has been deprecated and remains for backward compatibility only. Use the IntBroker class Resubmit method instead.

You may want to use this method after an end user has finished fixing any errors in the message data, and you want to resubmit the message, rerunning the subscription PeopleCode.

The function is only available when the message has one of the following statuses:

• Error

• Timeout

• Edited

• Canceled

### Parameters

Field or Control

Definition

PubID

Specify the PubID as a number.

PubNode

Specify the Pub node as a string.

ChannelName

Specify the channel name as a string.

VersionName

Specify the version name as a string.

MessageName

Specify the name of the message as a string.

SubscriptionName

Specify the name of the subscription as a string.

Segment

Specify an integer representing which segment you want to access. The default value is one, which means that if you do not specify a segment, the first segment is accessed.

### Returns

A Boolean value: True if function completed successfully, False otherwise.

### Syntax

`Return [expression]`

### Description

Use the Return function to return from the currently active function; the flow of execution continues from the point where the function was called.

If the function or method returns a result, that is, if a return value is specified in the Returns clause of the function or method definition, expression specifies the value to pass back to the caller and must be included. If the function or method does not return a result, the expression is not allowed. If Return appears in a main program, it acts the same as the Exit function.

### Example

In the example a Boolean return value is specified in the Returns clause of the Function statement. The Return statement returns a True or False value to the calling routine, based on the contents of &UPDATEOK.

``````Function run_status_upd(&PROCESS_INSTANCE, &RUN_STATUS) Returns Boolean;
&UPDATEOK = SQLExec( )("update PS_PRCS_RQST set run_status = :1  where process_instance = :2", &RUN_STATUS, &PROCESS_INSTANCE);
If &UPDATEOK Then
Return True;
Else
Return False;
End-If;
End-Function; ``````

### Description

Use the Returns keyword in function definitions and in method declarations and definitions.

### Syntax

`ReturnToServer({True | False | &NODE_ARRAY, | &Message})`

### Description

Use the ReturnToServer function to return a value from a PeopleCode messaging program to the publication or subscription server.

Note: ReturnToServer is a special case of a built-in function that's no longer supported. The deprecated handler for OnRequest subscriptions cannot be upgraded. ReturnToServer can only be used in an OnRequest event fired using the deprecated handler. This means that ReturnToServer no longer works and is not valid in any case other than when the code has already been written and used in a deprecated handler.

You would use this in either your publication or subscription routing code, to either return an array of nodes that the message should be published to, or to do error processing (return False if entire message wasn’t received.)

What is returned depends on where the PeopleCode program is called from.

From OnRoute Publication:

• True: All nodes the message was published to are returned.

• False: No nodes are returned (generally used with error checking).

• &NODE_ARRAY: The nodes specified in the array are returned.

• &Message: Return a response message. This must be an already instantiated message object.

Note: You can return XmlDoc objects as responses. Only homogeneous type transactions are supported, that is, you can only return an XmlDoc object as a response if and only if an XmlDoc object was used in the request. Similarly, you can only return a Message object if and only if a Message object was used in the request.

From OnRoute Subscription:

• True: The subscription node is returned.

• False: No node is returned. This is generally used with error checking.

### Parameters

Field or Control

Definition

True | False |&NODE_ARRAY | &Message

Specify True if you want publication nodes or the subscription node returned.

Specify False if you do not want any nodes returned, and nothing written to the database. This is generally used with error checking.

Specify an object reference to an array of node names if you want to return a list of nodes to be published to.

Specify a reference to a response message if you want to return a message.

None.

### Example

The following is an example of a publication routing rule, which would be in the OnRoutePublication. It is used to create publication contracts.

``````local message &MSG;
local array &NODE_ARRAY;
&MSG = GetMessage();
&EMPLID = &MSG.GetRowset()(1).QA_INVEST_HDR.EMPLID.Value;
&SELECT_SQL = CreateSQL("select PUBNODE from PS_EMPLID_NODE where EMPLID = :1", &EMPLID);
&NODE_ARRAY = CreateArray();

While &SELECT_SQL.Fetch(&PUBNODE)
&NODE_ARRAY.Push(&PUBNODE);
End-While;
ReturnToServer(&NODE_ARRAY);``````

The following is an example of a subscription routing rule, which would be placed in the OnRouteSubscribe event:

``local message &MSG;``
``````&MSG = GetMessage();
If all(&FOUND) Then
ReturnToServer(True);
Else
ReturnToServer(False);
End-if;``````

The following is a basic example of using an XmlDoc object:

``````Local XmlDoc &xmldoc;
. . .
/* build xmldoc */
. . .
ReturnToServer(&xmldoc);``````

### Syntax

`ReValidateNRXmlDoc(NRID, EntityName)`

### Description

Use the ReValidateNRXmlDoc function to revalidate a non-repudiation XML message. After a document has been signed and validated, you can use this function to verify it was delivered or received by the system calling the function. This function is primarily used by the Message Monitor.

### Parameters

Field or Control

Definition

NRID

Specify the non-repudiation ID for the XML message that you want to revalidate. This parameter takes a numeric value.

EntityName

Specify the name of the entity that signed the data, as a string. For Peoplesoft, this is the node name.

### Returns

A Boolean value: True if message is revalidated, False otherwise.

### Syntax

`RevalidatePassword()`

### Description

Use the RevalidatePassword function to revalidate the password that the current user used to sign onto the PeopleSoft application.

Note: In certain scenarios such as LDAP authentication and depending on the implementation, the user ID used for signon might differ from the operator ID of user profile in effect after signon. RevalidatePassword automatically accounts for this and requests revalidation based on the signon ID.

#### Restrictions on Use in PeopleCode Events

Control does not return to the line after RevalidatePassword until after the user has filled in a value or pressed ENTER. This interruption of processing makes RevalidatePassword a “think-time” function which means that it shouldn’t be used in any of the following PeopleCode events:

• SavePreChange.

• Workflow.

• RowSelect.

• SavePostChange.

• Any PeopleCode event that fires as a result of a ScrollSelect (or one of its relatives) function calls, or a Select (or one of its relatives) Rowset class method.

#### Restrictions on Use in Signon PeopleCode

RevalidatePassword does not work in signon PeopleCode. If you use this function in signon PeopleCode, you create an infinite loop.

### Returns

Returns a numeric value or a constant: you can check for either.

Value

Constant

Meaning

0

%RevalPW_Valid

1

%RevalPW_Failed

2

%RevalPW_Cancelled

### Example

RevalidatePassword is commonly used in the SaveEdit PeopleCode to verify that the user entering the data is the same as the one who signed onto the PeopleSoft application.

``````&TESTOP = RevalidatePassword();
Evaluate &TESTOP
When 1
Break;
End-Evaluate;
``````

### Syntax

`Right(str [, num_chars])`

### Description

Use the Right function to return a specified number of characters from the right side of a string. The function is useful if, for example, you want to get the last set of characters in a zip code or other fixed-length identification string. If the string contains Unicode non-BMP characters, each code unit of the surrogate pair is counted as a separate character and care should be taken not to split the surrogate pair.

### Parameters

Field or Control

Definition

str

A String value from which you want to get the rightmost characters.

num_chars

A Number value, greater than or equal to zero. If num_chars is omitted it is assumed to be equal to 1.

### Returns

Returns a String value equal to the rightmost num_chars character(s) in str.

### Example

If &ZIP is equal to "90210-4455", the following example sets &SUFFIX to "4455":

``&SUFFIX = Right(&ZIP, 4)``

### Syntax

`Round(dec, precision)`

### Description

Use the Round function to round a decimal number to a specified precision.

### Parameters

Field or Control

Definition

dec

A Number value to be rounded.

precision

A number value specifying the decimal precision to which to round dec.

### Returns

Returns a Number value equal to dec rounded up to precision decimal places.

### Example

The following examples set the value of &TMP to 2.2, 9, then 24.09:

``````&TMP = Round(2.15,1);
&TMP = Round(8.789,0);
&TMP = Round(24.09372,2);``````

### Syntax

`RoundCurrency(amt, currency_cd, effdt) `

### Description

Different currencies are represented at different decimal precessions. The RoundCurrency function is a rounding function that takes currency precision into account, using a value stored in the CURRENCY_CD_TBL PeopleTools table.

### Parameters

Field or Control

Definition

amt

The amount to be rounded.

currency_cd

The currency code.

effdt

The effective date of currency rounding.

### Returns

Returns a Number value equal to amt rounded to the currency precision for currency_cd.

### Example

The following example rounds 12.567 to 12.57, using the appropriate currency precision for US Dollars ("USD"):

``&RESULT = RoundCurrency(12.567, "USD", EFFDT);``

### Syntax

`RowFlush(scrollpath, target_row)`

Where scrollpath is:

`[RECORD.level1_recname, level1_row,  [RECORD.level2_recname, level2_row, ]  RECORD.target_recname`

To prevent ambiguous references, you can use SCROLL. scrollname, where scrollname is the same as the scroll level’s primary record name.

### Description

Use the RowFlush function to remove a specific row from a page scroll and from the component buffer.

Note: This function remains for backward compatibility only. Use the FlushRow rowset method instead.

Rows that are flushed are not deleted from the database.

RowFlush is a specialized and rarely used function. In most situations, you will want to use DeleteRow to remove a row from the component buffer and remove it from the database as well when the component is saved.

### Parameters

Field or Control

Definition

scrollpath

A construction that specifies a scroll level in the component buffer.

target_row

The row number of the row to flush.

None.

### Example

The following example flushes a row in a view from the component buffer:

``RowFlush(RECORD.BNK_RCN_DTL_VW, &ROW1);``

### Syntax

`RowScrollSelect(levelnum, scrollpath, Record.sel_recname [, sqlstr [, bindvars]] [, turbo])`

Where scrollpath is:

`[Record.level1_recname, level1_row, [Record.level2_recname, level2_row, ] Record.target_recname`

and where bindvars is an arbitrary-length list of bind variables in the form:

`bindvar1 [, bindvar2]. . .`

To prevent ambiguous references, you can use Scroll. scrollname, where scrollname is the same as the scroll level’s primary record name.

### Description

The RowScrollSelect is similar to ScrollSelect except that it reads data from the select record into a scroll under a specific parent row, rather than automatically distributing the selected rows under the correct parent rows throughout the buffer.

Note: This function remains for backward compatibility only. Use the Select rowset method instead.

You must use the WHERE clause in the SQL string to ensure that only rows that match the parent row are read into the scroll from the select record. Otherwise, all rows are read in under the specified parent row.

### Parameters

Field or Control

Definition

levelnum

Specifies the scroll level of the scroll area into which selected rows will be read. It can be 1, 2, or 3.

scrollpath

A construction that specifies a scroll level in the component buffer.

Record. sel_recname

Specifies the select record. The selname record must be defined in Application Designer and SQL created as a table or a view, unless sel_recname and target_recname are the same. The sel_recname record can contain fewer fields than target_recname, although it must contain any key fields to maintain dependencies page records. This enables you to limit the amount of data read into the component buffers.

sqlstr

Contains a WHERE clause to restrict the rows selected from sel_recname and/or an ORDER BY clause to sort the rows. The WHERE clause may contain the PeopleSoft SQL platform functions that are used for SQLExec processing, such as %DateIn or %Substring.

bindvars

A list of bind variables to be substituted in the WHERE clause.

turbo

Setting this parameter to True turns on turbo mode for RowScrollSelect. This will improve the performance of ScrollSelect verbs by as much as 300%, but should be implemented with caution on existing applications.

See InsertRow.

### Returns

The number of rows read (optional.) This counts only lines read into the specified scroll. It does not include any additional rows read into autoselect child scrolls of the scroll.

### Example

Here is an example of RowScrollSelect using bind variables:

``````If All(QTY_PICKED) Then
&LEVEL1ROW = CurrentRowNumber(1);
&LEVEL2ROW = CurrentRowNumber(2);
&ORDER_INT_LINE_NO = FetchValue(Record.SHIP_SUM_INV_VW, &LEVEL1ROW,
ORDER_INT_LINE_NO, &LEVEL2ROW);
&INV_ITEM_ID = FetchValue(Record.SHIP_SUM_INV_VW, &LEVEL1ROW,
INV_ITEM_ID, &LEVEL2ROW);
&QTY = RowScrollSelect(3, Record.SHIP_SUM_INV_VW, CurrentRowNumber(1),
RECORD.SHIP_DTL_INV_VW, CurrentRowNumber(2), Record.DEMAND_LOC_INV,
RECORD.DEMAND_LOC_INV, "WHERE BUSINESS_UNIT = :1 AND ORDER_NO = :2
AND DEMAND_SOURCE = :3 AND SOURCE_BUS_UNIT = :4
AND ORDER_INT_LINE_NO = :5 AND SCHED_LINE_NO = :6 AND INV_ITEM_ID = :7
AND DEMAND_LINE_NO = :8", SHIP_HDR_INV.BUSINESS_UNIT, ORDER_NO, DEMAND_SOURCE,
SOURCE_BUS_UNIT, ORDER_INT_LINE_NO, SCHED_LINE_NO, INV_ITEM_ID, DEMAND_LINE_NO, True);
End-If;``````

### Syntax

`RowScrollSelectNew(levelnum, scrollpath, RECORD.sel_recname, [sqlstr [, bindvars]] [, turbo])`

Where scrollpath is:

`[Record.level1_recname, level1_row, [Record.level2_recname, level2_row, ] Record.target_recname`

where bindvars is an arbitrary-length list of bind variables in the form:

`binvar1 [, bindvar2]. . .`

To prevent ambiguous references, you can use Scroll. scrollname, where scrollname is the same as the scroll level’s primary record name.

### Description

The RowScrollSelectNew function is similar to RowScrollSelect, except that all rows read into the work scroll are marked new so they are automatically inserted into the database at Save time.

Note: This function remains for backward compatibility only. Use the SelectNew rowset method instead.

This capability can be used, for example, to insert new rows into the database by selecting data using a view of columns from another database tables.

### Parameters

Field or Control

Definition

level

Specifies the scroll level of the scroll area into which selected rows are read. It can be 1, 2, or 3.

scrollpath

A construction that specifies a scroll level in the component buffer.

Record. sel_recname

Specifies the select record. The selname record must be defined in the record definition and SQL created as a table or a view, unless sel_recname and target_recname are the same. The sel_recname record can contain fewer fields than target_recname, although it must contain any key fields to maintain dependencies with other page records. This enables you to limit the amount of data read into the data buffers.

sqlstr

Contains a WHERE clause to restrict the rows selected from sel_recname and/or an ORDER BY clause to sort the rows. The WHERE clause may contain the PeopleSoft SQL platform functions that are used for SQLExec processing, such as %DateIn or %Substring.

bindvars

A list of bind variables to be substituted in the WHERE clause. The same restrictions that exist for SQLExec exist for these variables.

turbo

Setting this parameter to True turns on turbo mode for RowScrollSelectNew. This will improve the performance of ScrollSelect verbs by as much as 300%, but should be implemented with caution on existing applications.

See InsertRow.

### Returns

The number of rows read (optional.) This counts only lines read into the specified scroll. It does not include any additional rows read into autoselect child scrolls of the scroll.

### Example

The following example reads rows into the level 2 scroll and marks the rows as new:

``&QTY = RowScrollSelectNew(2, Record.BI_LINE_VW, &ROW1, Record.BI_LINE_DST, Record.BI_LINE_DST, "where business_unit = :1 and invoice = :2 and line_seq_num = :3", BI_HDR.BUSINESS_UNIT, BI_HDR.INVOICE, &CURR_LINE_SEQ);``

### Syntax

`RTrim(string[, trim_string])`

### Description

Use the RTrim function to remove characters, usually trailing blanks, from the right of a string.

If you need to trim a quotation mark, you need to escape it with a single `"`. For example

``&TRIMMED = RTrim(&NAME, """");``

### Parameters

Field or Control

Definition

string

A String from which you want to remove trailing characters.

trim_string

A String consisting of a list of characters, all occurrences of which are removed from the right of string. Characters in trim_string that occur in string to the left of any character not in trim_string are be removed. If this parameter is not specified, " " is assumed.

### Returns

Returns a String formed by deleting, from the end of source_str, all occurrences of each character specified in trim_str.

### Example

The following example removes trailing blanks from &NAME and places the results in &TRIMMED:

``&TRIMMED = RTrim(&NAME);``

The following example removes trailing punctuation marks from REC.INP and places the results in &TRIMMED:

``&TRIMMED = RTrim(REC.INP, ".,;:!?");``