AnsweredAssumed Answered

What is the syntax to get count of returned rows from GEL query?

Question asked by Alex_Feldstein on Jan 24, 2011
Latest reply on Dec 8, 2015 by GB_Pawel_Krystosiak
The GEL code to process the results of a query is:
<sql:query var="results" >
query here
</sql:query>

<dataset>
<core:forEach items="${results.rowsByIndex}" trim="false" var="row">
process for each returned row...
etc.

I want to know the number of records for debug purposes and tried:

<gel:log level="debug">Query records:[${results.rowsByIndex}]</gel:log>

but this gets an object reference

From other languages (I don't know Java) I would do:

results.rowsByIndex.count

but this gets me a null. What is the syntax to get the count number of rows (0 or more) returned by the query at runtime?

Outcomes