<@ADDROWS ARRAY=arrayVarName VALUE=rowsToAdd [POSITION=position] [SCOPE=scope]>
Adds the rows specified in VALUE to the array in the variable named by ARRAY. This tag does not return anything.
If the variable specified by the ARRAY attribute does not exist, it is created.
The VALUE attribute specifies the row(s) to add. You may use the <@VAR> tag and specify a variable containing an array, or specify any other meta tag that returns an array. This array must have the same number of columns as the one specified by ARRAY; otherwise, an error is generated.
For single-column arrays, the VALUE attribute may be a text value, rather than an array. In this case, a single row is added with the value specified.
The POSITION attribute specifies the index of the row to start adding from; the rows are added after the specified row. To add rows to the beginning of the array, use 0 as the value for POSITION. To add rows to the end of the array, use -1. If POSITION is not specified, the rows are added to the end.
The SCOPE attribute specifies the scope of the variable specified as the value of the ARRAY attribute. If the scope is not specified, the default scoping rules are used.
Meta tags are permitted in any of the attributes.
and the local variable colors2 contains the following array:
<@ADDROWS ARRAY="colors" SCOPE="local" VALUE="@@local$colors2"> results in colors containing:
and the user variable new_choices contains the following array:
<@ADDROWS ARRAY="choices_list" SCOPE="user" VALUE="<@VAR NAME='new_choices' SCOPE='user'>" POSITION=1> results in choices_list containing:
Copyright © 1999, Pervasive Software. All rights reserved.