Zero recordcount query object as boolean value?

Is there a Lucee ( or CF admin setting ) that would interpret a pointer to a query object that has zero rows as a boolean value ?

I have the following code that Lucee does not seem happy with ( causing blank page )

<cfif Request.TimeSheet.Locked>

I checked that the above variable does exist ( it is a query ) and has zero recordcount.

I can check it for zero string, but not boolean.

<cfif Request.TimeSheet.recordcount AND Request.TimeSheet.Locked>

Would be a shorthand way to see records are returned and locked is true.

Another way is using val to change empty string to a zero:
<cfif val(Request.TimeSheet.Locked)>

2 Likes