RAD routine: as.copy

A RAD routine that copies an element within an array or structure from one position to another, leaving the original in place. This routine is used in conjunction with as.delete, as.insert, and as.move routines.

Routine

as.copy

Parameters

The following parameters are valid for the as.copy routine:

Name Data type Required Description
file record No The file variable that you are currently editing. The value is always $file when called from Format Control.
name character No

Data is not normally passed to this parameter. The default is the result of executing the cursor.field.name(1) function. The application as.get.name then executes against this result.

Note You can pass the name of a specific arrayed structure. If the data passed to this parameter does not contain commas, it is considered to be an arrayed structure name. If a comma is found, the application as.get.name is executed against the data.

index number No

The number of lines (height property) in the subform that displays the arrayed structure. For example, if the arrayed structure subform contains data on lines 1 and 2, then this parameter is 2. The default value is 1.

Note This is not the window size that displays the arrayed structure.

When calling the application from Format Control, the value must be passed as a number by using the following syntax:

val("n", 1)

Where:

The value of n is the number of lines in the subform, and 1 indicates a data type of number.