<@ADDROWS>
Syntax
<@ADDROWS ARRAY=arrayVarName
VALUE=rowsToAdd [POSITION=position]
[SCOPE=scope]>
Description
Adds the rows specified in VALUE
to the array in the variable named by ARRAY. This tag does
not return anything.
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.
Examples
- If the local variable colors
contains the following array:
and the local variable colors2
contains the following array:
<@ADDROWS ARRAY="colors"
SCOPE="local" VALUE="@@local$colors2">
results in colors containing:
orange |
amber |
burnt umber |
yellow |
- If the user variable choices_list
contains the following array:
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:
News |
2 |
Stocks |
1 |
Weather |
5 |
Sports |
3 |
Movies |
4 |
See Also
<@DELROWS>
<@UNION>
|