Show/Hide Toolbars

XSharp

NoteThis command is defined in a header file and will be preprocessed by the X# preprocessor to a function call. If you disable the standard header (-nostddefs) files then this command will not be available. If you tell the compiler to use a different standard header file (-stddef ) then this command may also be not available

Purpose

Adds one record to the currently selected table for each row in an array and fills each record with data from the corresponding array row.

Syntax

APPEND FROM ARRAY <ArrayName> [FOR <lCondition>]  
[FIELDS <idFieldList> | FIELDS LIKE <Skeleton> | FIELDS EXCEPT <Skeleton>]

Arguments

<ArrayName>Specifies the name of the array that contains the data to be copied to the new records. New records are added to the table until all rows in the array are appended.        

 

FIELDS <idFieldList>The list of fields to process. The default is all fields with the exception of memo fields, unless the command supports the MEMO clause.
Only fields with the same names and types in both files are appended.  If fields with the same name do not match in data type, a runtime error is raised.
FIELDS LIKE <Skeleton>You can specify field names with a wild card, such as FIELDS LIKE *name
FIELDS EXCEPT <Skeleton>You can exclude fields, such as for example the primary keys: FIELDS EXCEPT Id
<Skeleton> supports wildcards (* and ?). For example, to replace all fields that begin with the letters A and P, use:
FIELDS LIKE A*,P*

 

Please note that you can combine FIELDS LIKE and FIELDS EXCEPT but you cannot combine a fields list with the LIKE and EXCEPT clauses.

 

FOR <lCondition>A condition that each visible record within the scope must meet in order to be processed.  If a record does not meet the specified condition, it is ignored and the next visible record is processed.  If no <Scope> or WHILE clause is specified, having a for condition changes the default scope to all visible records.

 

See Also

COPY TO ARRAY, GATHER, SCATTER