0

I am trying to find number of rows in a ResultSet using idocscript. Is there an optimal way of doing other than looping through the ResultSet as below?

<$sampleRSLength=0$>
<$if rsExists("sampleResultSet")$>
  <$loop sampleResultSet$>
    <$sampleRSLength=sampleRSLength+1$>
  <$endloop$>
<$endif$>
vk239
  • 1,014
  • 1
  • 12
  • 30
  • 1
    As an FYI, I try to watch SO but you will get quicker assistance on a forum such as OTN: https://community.oracle.com/community/fusion_middleware/webcenter/webcenter_content/content – Jonathan Hult Dec 24 '15 at 12:33

2 Answers2

1

I was able to find the answer myself after reading through the IdocScript reference guide in detail.

Idocscript has a method rsNumRows() which can be used for getting number of rows in a result set.

<$if rsExists("sampleResultSet")$>
 <$sampleRSLength=rsNumRows("sampleResultSet")$>
<$endif$>
vk239
  • 1,014
  • 1
  • 12
  • 30
1
<$sampleResultSet.#numRows$>

will also work.