如何在 Oracle UCM 中使用 IdocScript 查找结果集的长度?

How to find length of ResultSet using IdocScript in Oracle UCM?

我正在尝试使用 idocscript 查找 ResultSet 中的行数。除了如下所示循环遍历 ResultSet 之外,还有其他最佳方法吗?

<$sampleRSLength=0$>
<$if rsExists("sampleResultSet")$>
  <$loop sampleResultSet$>
    <$sampleRSLength=sampleRSLength+1$>
  <$endloop$>
<$endif$>

在详细阅读 IdocScript reference guide 后,我自己找到了答案。

Idocscript 有一个方法 rsNumRows() 可用于获取结果集中的行数。

<$if rsExists("sampleResultSet")$>
 <$sampleRSLength=rsNumRows("sampleResultSet")$>
<$endif$>
<$sampleResultSet.#numRows$>

也可以。