Transfer

Mon 01 January 2018

Syntax

Transfer(new_instance, MenuName.menu_name, BarName.bar_name, ItemName.menu_item_name, Page.component_item_name, action [, keylist])

In which keylist is a list of field references in the form:

[recordname.]field1 [, [recordname.]field2]. . .

Or in which keylist is a list of field references in the form:

&RecordObject1 [, &RecordObject2].  .  .

Description

Use the Transfer function to close the current page and transfer the end user to another page, either within the current component or in another component. Transfer can either start a new instance of the application and transfer to the new page there, or close the old page and transfer to the new one in the same instance of PeopleTools.

Note: The Transfer function cannot be used with an Internet script or an Application Engine program.

Transfer is more powerful than the simpler TransferPage, which permits a transfer only within the current component in the current instance of PeopleTools. However, any variables declared as component do not remain defined after using the Transfer function, whether you’re transferring within the same component or not.

You can use Transfer from a secondary page (either with or without using a pop-up menu) only if you’re transferring to a separate instance of a component. You cannot use Transfer from a secondary page if you’re not transferring to a separate instance of a component.

If you provide a valid search key for the new page in the optional keylist , the new page opens directly, using the values provided from keylist as search key values. A valid key means that enough information is provided to uniquely identify a row: not all of the key values need to be provided. If no key is provided, or if the key is invalid, or if not enough information is provided to identify a unique row, the search dialog box displays, enabling the end user to search for a row.

Note: If Force Search Processing is specified in Application Designer for the component, the search dialog box always displays, whether the keylist is provided or not.

If barname + itemname + component_item_name is an invalid combination, an error message displays explaining that there were invalid transfer parameters.

In the component_item_name parameter, make sure to pass the component item name for the page, not the page name.

Image: Determining the component item name

The component item name is specified in the component definition, in the Item Name column on the row corresponding to the specific page, as shown here. In this example, the PERSONAL_DATA page name appears twice: once with an item name of PERSONAL_DATA_1, and once with the item name of PERSONAL_DATA_2.

Determining the component item name

Parameters

Field or Control

Definition

new_instance

Set this parameter to True to start a new application instance, or to False to use the current window and replace the page already displayed.

menu_name

The name of the menu where the page is located prefixed with the reserved word MenuName .

bar_name

The name of the menu bar where the page is located, prefixed with the reserved word BarName .

menu_item_name

The name of the menu item where the page is located, prefixed with the reserved word ItemName .

component_item_name

The component item name of the page to be displayed on top of the component when it displays. The component item name is specified in the component definition. This parameter must be prefixed with the keyword Page .

action

Uses a single-character code as in %Action. Valid actions are "A" (add), "U" (update), "L" (update/display all), "C" (correction), and "E" (data entry).

[ keylist ]

An optional list of field specifications used to select a unique row at level zero in the page you are transferring to, by matching keys in the page you are transferring from. It can also be an already instantiated record object.

If a record object is specified, any field of that record object that is also a field of the search record for the destination component is added to keylist. The keys in the fieldlist must uniquely identify a row in the "to" page search record. If a unique row is not identified, or if Force Search Processing is selected for the component, the search dialog box appears.

If the keylist parameter is not supplied then the destination component's search key must be found as part of the source components level 0 record buffer.

Returns

None.