AnsweredAssumed Answered

NULL Row count check core:when

Question asked by derrickt on Dec 5, 2013
Latest reply on Dec 5, 2013 by gcubed

I have a script that sends an email validating data. I still want something to send even if the query returns no rows. My current statement looks something like this:

<core:choose>
    <core:when test="${val.rowCount != NULL}">
<![CDATA[Project: ${name} is invalid. The following fields are null.<br/>
<br/>${field1}${field2}...<br/>]]>
    </core:when>
    <core:otherwise>
<![CDATA[No Invalid Projects]]>
    </core:otherwise>
</core:choose>
 
When I have a project that is invalid, the email generates perfectly. When I have no invalid projects (no rows returned), the email is blank (as opposed to No Invalid Projects). 
 
Any thoughts on how to do a test for null row returns?
 
Thanks. 

    

Outcomes