<@ROWS> </@ROWS>
Syntax
<@ROWS [ARRAY=array]
[SCOPE=scope] [PUSH=push]
[START=start] [STOP=stop]
[STEP=step]></@ROWS>
Description
The Results HTML appearing between this tag
pair is processed once for each row of the result set generated by an
action.
This tag pair also allows iteration over
the rows of an array. This tag places a copy of the text between the
opening and closing tags for each row of the array.
ARRAY is the array to loop over.
It can be the name of an array variable or an array value. The default
value is resultSet. All results-returning actions (Search,
Direct DBMS, External, Script, and Mail) perform an automatic
assignment of their results array to the local variable resultSet.
START refers to the starting
value for the index. The default value is 1.
STOP refers to the stopping value
for the index. The loop terminates when this value is exceeded, not
when it is reached. The default value is <@NUMROWS>.
STEP refers to the increment
added to the index after each iteration. The default value is 1.
PUSH allows the sending of data
to the client after the specified number of iterations have taken
place.
Note:
This tag must appear in
pairs and cannot span multiple actions. START and STOP
can only be used to specify points inside the array. If the index
exceeds the number of rows in the result set or reaches a negative
value, the loop terminates. If the specified STEP does not
take the index from START to STOP, no iterations
are made. If the START equals the STOP, one
iteration is made, regardless of the step or array sizes.
<@ROWS> blocks can be
nested. In that case, the tags that get their reference from a <@ROWS>
block (for example, <@COL>, <@COLUMN>,
<@MAXROWS>) refer to the innermost <@ROWS>
block.
Examples
<@ROWS ARRAY="<@VARNAMES
SCOPE='USER'>"
START="<@MAXROWS>" STOP="1" STEP="1">
Variable <@CURROW> is named <@COL NUM="1"> <BR>
</@ROWS>
Variable x is named varname. It is
printed for each variable in the user's scope,
going in reverse order.
<@ROWS PUSH=100>
<@COLUMN NAME="ACTIVITYLOG.LOGTIMESTAMP">
<@COLUMN NAME="ACTIVITYLOG.DOMAINNAMEID"><BR>
</@ROWS>
This example allows you to see the
resulting HTML 100 rows at a time. The effects of the PUSH attribute
depend on the HTML presentation of the result set and the Web browser
that is used to access Tango. Sometimes, even though Tango and the Web
server are sending data to the Web browser, the Web browser holds up
the data without displaying it. For example, if the <@ROWS>
block in the previous paragraph sits between a <TABLE></TABLE>
with rows of the result set corresponding to the rows of the table, a
Netscape Web browser does not display the result file until the HTML
<TABLE> block is completed.
See Also
<@COL>
<@COLUMN>
<@MAXROWS>
|