Hi,
Don't mean to disagree, but give that line of code a shot, I use it
everywhere in my scripts!  You must use double quotes around the variable
name though.

> -----Original Message-----
> From: Bud [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, August 29, 2000 10:26 AM
> To: [EMAIL PROTECTED]
> Subject: RE: Can't work out IIF/IsDefined quirk
>
>
> On 8/29/00, Geoffrey V. Brown penned:
> >Hi,
> >Use this:
> >
> >#IIF(isdefined("form.categories"), "form.categories", de(''))#
>
> Sorry. You can't use isdefined in an IIF. If it's not defined it will
> still try and reference the variable and return an error. If you must
> use isdefined, you'll need to use a real cfif.
>
> What you can do is this:
>
> <CFIF isDefined('form.categories')>
> <cfset variables.categories = form.categories>
> <cfelse>
> <cfset variables.categories = "">
> </CFIF>
>
> IIf(variables.categories is "", DE(''), DE(variables.categories))#
>
> Or:
>
> IIf(variables.categories is "", DE(''), DE('#variables.categories#'))#
> --
>
> Bud Schneehagen - Tropical Web Creations
>
> _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
> ColdFusion Solutions / eCommerce Development
> [EMAIL PROTECTED]
> http://www.twcreations.com/
> 954.721.3452
> ------------------------------------------------------------------
> ------------
> Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
> To Unsubscribe visit
> http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf
_talk or send a message to [EMAIL PROTECTED] with
'unsubscribe' in the body.


------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to