Field Variables

The Field Tag has a set of standard variables that can be used to display different types of information within a result set. The syntax for using Field variables is <FIELD NAME="ResultSetVariable" Format="Default">.

 

Name Parameter

=ResultSetSize Size of the attached ResultSet.
=ResultSetRow Current record of the attached ResultSet.
=PageRow Current row that is being displayed on this page.
=PageMaxRows Maximum rows being displayed on this page.
=PageStartRow Record number of the result set to start on this page.
=PageFinishRow Record number of the result set to finish on this page.
=CurrentPage Current page number. Equal to PageStartRow / PageMaxRows.
=TotalPages Last page number.
=Now The current time.
=ConnectVersion Vof a Web Content Management system.
=ConnectUser Current user or Anonymous if not logged in.

 

Format Parameter

Format= Fields can be formatted on output via the use of the optional FORMAT attribute. Acceptable formats are defined via the Java MessageFormat class.

 

Default Parameter

Default= A default value for a field can be entered. This will appear in the form if the user enters no data.

Example:

The records displayed by a result set can be numbered by using the ResultSetRow tag.

<html>
<head></head>
<body>
<TABLE border="1">
<TR>
<TH><u>Record</u></TH>
<TH><u>Employee Number</u></TH>
<TH><u>Full Name</u></TH>
</tr>
<LOOP>
<tr>
<TD><FIELD NAME="ResultSetRow"></TD>
<TD><FIELD NAME="employeenumber"></td>
<TD><FIELD NAME="firstname"><FIELD NAME="lastname"></td>
</TR>
</LOOP>
</TABLE>
</body>
</html>

The ResultSetRow variable is added as a new cell within the result set Loop. A new table header cell is also added. The resulting web page now displays the record number for each record displayed.

Parent topic: Building Result Sets.


IBM Workplace Web Content Management - V5.1.0.1 -

 

Workplace Web Content Management is a trademark of the IBM Corporation in the United States, other countries, or both.

 

IBM is a trademark of the IBM Corporation in the United States, other countries, or both.