[thelist] ColdFusion MX and CFIF notation

Buffington, Michael michael.buffington at opbu.xerox.com
Wed Nov 20 15:34:00 CST 2002


It should still work. I just tested it on my single developer version of MX and it works fine.

I know you didn't ask for opinion on this, but I can't resist; my personal preference is to use "longhand" for things like this, for a couple of reasons: code readablity, and the fact that some less experienced developers get confused about this (I know, shameful, but true).

By the way, are you getting a specific error, or is it just evaluating to false? Could be that there are indeed no records in the "Whatever" query.

-----Original Message-----
From: Ben Dyer [mailto:ben_dyer at imaginuity.com]
Sent: Wednesday, November 20, 2002 12:58 PM
To: thelist at lists.evolt.org
Subject: [thelist] ColdFusion MX and CFIF notation


In ColdFusion 5, this:

   <CFIF Whatever.RecordCount>

used to be the equivalent of:

   <CFIF Whatever.RecordCount GT 0>

However, in ColdFusion MX, this no longer appears to be the case.  The
exact opposite appears to be true.  Does MX change this rule so that <CFIF
Whatever.RecordCount> is checking for the existence of the variable, rather
than a non-zero value of that variable?

If so, why?

(I've done some Googling on this and came up with nothing...)

--Ben

--
* * Please support the community that supports you.  * *
http://evolt.org/help_support_evolt/

For unsubscribe and other options, including the Tip Harvester
and archives of thelist go to: http://lists.evolt.org
Workers of the Web, evolt !



More information about the thelist mailing list