CopyFields function
Syntax
CopyFields(from, to)
where from and to are constructions that reference rows of data on specific source and target records in the component buffer; each have the following syntax:
level, scrollpath, target_row
and 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.
Description
Use the CopyFields function to copy like-named fields from a row on the specific source record to a row on the specific target record.
Note:
This function remains for backward compatibility only. Use the CopyFieldsTo or CopyChangedFieldsTo record class methods instead.
Parameters
| Parameter | Description |
|---|---|
|
from |
A placeholder for a construction (level, scrollpath, target_row) that references the first row in the comparison. |
|
to |
A placeholder for a construction (level, scrollpath, target_row) that references the second row in the comparison. |
|
level |
Specifies the scroll level for the target level scroll. |
|
scrollpath |
A construction that specifies a scroll level in the component buffer. |
|
target_row |
Specifies the row number of each target row on its scroll level. |
Returns
Optionally returns a Boolean value indicating whether the function succeeded.
Example
The following example copies fields from PO_RECEIVED_INV (level 1 scroll) from row &ROW to PO_RECV_INV_VW (level 1 scroll), row &LOC_ROW:
CopyFields(1, RECORD.PO_RECEIVED_INV, &ROW, 1, RECORD.PO_RECV_INV_VW, &LOC_ROW);
Related Topics
- PeopleCode API Reference: CopyFieldsTo method: Record class
- PeopleCode API Reference: CopyChangedFieldsTo method: Record class
- PeopleCode API Reference: CopyTo method: Rowset class
- PeopleCode Developer’s Guide: Understanding Data Buffer Access
- PeopleCode Developer’s Guide: Specifying Data with References Using Scroll Path Syntax and Dot Notation
- CompareLikeFields function