I would do it like below: <CFIF testValue is not null> ...do something <CFELSE> ...catch exception </CFIF>
From: "Cox, Billy W [PCS]" <[EMAIL PROTECTED]> Reply-To: [EMAIL PROTECTED] To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]> Subject: RE: [KCFusion] checking for nulls... Date: Thu, 12 Sep 2002 09:07:35 -0500 MIME-Version: 1.0 Received: from Falcon.HKSI.net ([209.15.194.101]) by mc1-f14.law16.hotmail.com with Microsoft SMTPSVC(5.0.2195.5600); Thu, 12 Sep 2002 07:09:03 -0700 Received: from kcfusion.org (unknown [209.15.194.113])by Falcon.HKSI.net (Postfix) with ESMTPid 933DD2524E; Thu, 12 Sep 2002 09:49:23 -0500 (CDT) Received: from Falcon.HKSI.net [209.15.194.101] by hksi.net (SMTPD32-7.12) id A02A258B00A6; Thu, 12 Sep 2002 09:09:46 -0500 Received: from smtpgw5.sprintspectrum.com (smtpgw5.sprintspectrum.com [207.40.188.13])by Falcon.HKSI.net (Postfix) with ESMTP id E258A25239for <[EMAIL PROTECTED]>; Thu, 12 Sep 2002 09:47:57 -0500 (CDT) Received: from pkcex003.sprintspectrum.com (pkcex003.sprintspectrum.com [208.10.75.138])by smtpgw5.sprintspectrum.com (8.11.2/8.11.3) with ESMTP id g8CE7aE21317for <[EMAIL PROTECTED]>; Thu, 12 Sep 2002 09:07:37 -0500 (CDT) Received: by pkcex003.sprintspectrum.com with Internet Mail Service (5.5.2654.89)id <SNL1WGQM>; Thu, 12 Sep 2002 09:07:37 -0500 Message-ID: <[EMAIL PROTECTED]> Return-Receipt-To: "Cox, Billy W [PCS]" <[EMAIL PROTECTED]> X-Mailer: Internet Mail Service (5.5.2654.89) X-RBL-Warning: NOABUSE: Not supporting abuse@domain X-Note: This E-mail was scanned for spam. Precedence: bulk Sender: [EMAIL PROTECTED] X-Note: This E-mail was scanned for spam. Organization: Humankind Systems, Inc. Return-Path: [EMAIL PROTECTED] X-OriginalArrivalTime: 12 Sep 2002 14:09:04.0008 (UTC) FILETIME=[F34FB880:01C25A65] I would code it this way: <cfif not len(trim(var))> <cfset var="something"> </cfif> It accomplishes the same thing, just more elegantly. Billy Cox Intranet/Extranet Sprint PCS 913-534-5873 913-638-5557 pcs -----Original Message----- From: Nate Rightmire [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 12, 2002 8:35 AM To: [EMAIL PROTECTED] Subject: RE: [KCFusion] checking for nulls... I always use the following: <cfif len(trim(var)) is 0> <cfset var = "something"> </cfif> I read that this was better than just <cfif var="">. I dunno if it really is, but that is what I use. My $.02 Nate -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Johnson, Michael Sent: Thursday, September 12, 2002 7:46 AM To: CF-List (E-mail) Subject: [KCFusion] checking for nulls... what's the syntax to check if a variable is "null"... i.e. <cfif var is 'null> <cfset var = "something"> </cfif> Mike Johnson Science Application International Corporation (757) 870-9165 Emai: [EMAIL PROTECTED] ______________________________________________________________________ The KCFusion.org list and website is hosted by Humankind Systems, Inc. List Archives........ http://www.mail-archive.com/cf-list@kcfusion.org Questions, Comments or Glowing Praise.. mailto:[EMAIL PROTECTED] To Subscribe.................... mailto:[EMAIL PROTECTED] To Unsubscribe................ mailto:[EMAIL PROTECTED] ______________________________________________________________________ The KCFusion.org list and website is hosted by Humankind Systems, Inc. List Archives........ http://www.mail-archive.com/cf-list@kcfusion.org Questions, Comments or Glowing Praise.. mailto:[EMAIL PROTECTED] To Subscribe.................... mailto:[EMAIL PROTECTED] To Unsubscribe................ mailto:[EMAIL PROTECTED] ______________________________________________________________________ The KCFusion.org list and website is hosted by Humankind Systems, Inc. List Archives........ http://www.mail-archive.com/cf-list@kcfusion.org Questions, Comments or Glowing Praise.. mailto:[EMAIL PROTECTED] To Subscribe.................... mailto:[EMAIL PROTECTED] To Unsubscribe................ mailto:[EMAIL PROTECTED] Roydean _________________________________________________________________ Send and receive Hotmail on your mobile device: http://mobile.msn.com ______________________________________________________________________ The KCFusion.org list and website is hosted by Humankind Systems, Inc. List Archives........ http://www.mail-archive.com/cf-list@kcfusion.org Questions, Comments or Glowing Praise.. mailto:[EMAIL PROTECTED] To Subscribe.................... mailto:[EMAIL PROTECTED] To Unsubscribe................ mailto:[EMAIL PROTECTED]