[thelist] CF: IsDefined() and Len() in one?

Frank framar at interlog.com
Sun May 6 01:04:09 CDT 2001


Is there a function that serves to perform both IsDefined() and 
Len()? I find that when I'm doing a search query that I often end up 
with a long query that looks like this:

<!--- Make the query -->

       SELECT #aWholeBuchaFieldsList#
       WHERE 1=1

      <cfif IsDefined("aField") AND Len(aField)>
      AND aField = 'Form.aField'
      </cfif>

      ...etc...

There must surely be a more elegant solution. Suggestions?


<tip type="Home Networking" author="Frank Marion">

A cheap and simple of option to connect your Mac to your PCs without 
having to use expensive and difficult to configure clients such as 
Dave is to use the Hotline server.

<http://www.bigredh.com>

It will transfer your files back and forth. It's pretty limited, but 
it gets your files back and forth. If you are using ethernet, it's 
pdq as well.

</tip>

<tip type="Cold Fusion Studio" author="Frank Marion">

A good way to learn new functions, tags and their syntax is to right 
click in a document, and choose either "insert tag" or "insert 
expression". If you look carefully you'll find a clover leafed button 
that will give you a quick instruction/syntax sheet. You can't copy 
from it, though, nor does Allaire display the correct syntax 
sometimes. (They quite often forget to show when quotes are necessary 
[the DateFormat() function for example].)

</tip>

-- 

Where there's a will, there's a way.

Frank Marion                      Loofah Communications
frank at loofahcom.com               http://www.loofahcom.com




More information about the thelist mailing list