This function returns a result set given the name of the result set. Because the actual object it returns is a result set, certain actions can be performed on the return value that cannot be performed on the return values of other functions. In particular, the loop syntax can be applied to the result.

Type and Usage


This function has one parameter, resultSetName, which is the name of the result set to return.


A result set object if found, otherwise null.


Suppose MyResultSet is the name of a result set, then you could loop on the result set using the following syntax:

<$loop rs("MyResultSet")$>... Script inside loop ...<$endloop$>

This function also can be used when temporarily assigning variables when calling Idoc script functions. In particular, the following example will temporarily assign the variable 'rsParam' to point to the same result set as pointed to by MyResultSet for the duration of the call to include the resource include my_include. If the result of the rs function is assigned to a variable, then that variable will have a shared pointer to the result set creating the same effect as if rsCreateReference were called.

<$inc("my_include", rsParam=rs("MyResultSet"))$>