ScrollSelectNew

Mon 01 January 2018

Syntax

ScrollSelectNew(levelnum, [Record.level1_recname, [Record.level2_recname, ]] Record.target_recname, Record.sel_recname [, sqlstr [, bindvars]] [, turbo])

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

bindvar1 [, bindvar2]. . .

Description

The ScrollSelectNew function is similar to ScrollSelect, 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 class 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 other database tables.

Parameters

Field or Control

Definition

levelnum

Specifies the level of the scroll level to be filled (the target scroll area. The value can be 1, 2, or 3.

target_recname

Specifies a record identifying the target scroll, into which the selected rows are read. If target_recname is on scroll level 2, it must be proceeded by a Record. level1_recname . If it is on level 3, you must specify both Record. level1_recname and Record. level2_recname .

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 (using Build, Project), unless sel_recname and target_recname are the same. The sel_recname record can contain fewer fields target_recname , although it must contain any key fields to maintain dependencies with other records on the page. 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. The same restrictions that exist for SQLExec exist for these variables.

turbo

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

See .

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.