I'm wrong.... damn you! if your not doing DE("") functions and just trying
to output the var it's works...
eg this works:
<cfoutput>
#iif( not structKeyExists(request, "moo"), 'writeoutput("yay")',
'REQUEST.MOO')#
</cfoutput>
and this doesn't
<cfoutput>
#iif( not structKeyExists(request, "moo"), 'writeoutput("yay")',
de("#REQUEST.MOO#"))#
</cfoutput>
oh well back to the drawing boards!
----- Original Message -----
From: "Tom Smith" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, February 21, 2003 11:22 AM
Subject: Re: [ cf-dev ] Iif() and StructKeyExists()
> really? I thought it checked the condition and then did what it needed to
> the first or the second expression depending on the result... I'm pretty
> sure it's always worked that way for me in the past... going to check
this
> now:)
> ----- Original Message -----
> From: "Steve Martin" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Friday, February 21, 2003 10:54 AM
> Subject: RE: [ cf-dev ] Iif() and StructKeyExists()
>
>
> IIf() will attempt to evaluate all expressions in the statement at once.
So,
> if the key doesn't exist it will fail when it tries to determine the value
> of proximity.
>
> -----Original Message-----
> From: Aidan Whitehall [mailto:[EMAIL PROTECTED]]
> Sent: 21 February 2003 10:08
> To: [EMAIL PROTECTED]
> Subject: RE: [ cf-dev ] Iif() and StructKeyExists()
>
>
> > this should work:
> >
> > #iif(not structKeyExists(values[i], "proximity"), de("null"),
> de("'#values[i].proximity#'"))#
>
> Unfortunately not. It's now displaying:
> "Element DISTANCE is undefined in a CFML structure referenced as part of
> an expression."
>
> Oh, and thx for the 2 brackets, Kola.
>
> Soddit... I've rewritten it using cfif and it works. Thanks all for the
> help, anyway.
>
>
> --
> Aidan Whitehall <[EMAIL PROTECTED]>
> Macromedia ColdFusion Developer
> Fairbanks Environmental Ltd +44 (0)1695 51775
>
> ________________________________________________________________________
> This e-mail has been scanned for all viruses by Star Internet. The
> service is powered by MessageLabs. For more information on a proactive
> anti-virus service working around the clock, around the globe, visit:
> http://www.star.net.uk
> ________________________________________________________________________
>
> --
> ** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/
>
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> For human help, e-mail: [EMAIL PROTECTED]
>
>
> --
> ** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/
>
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> For human help, e-mail: [EMAIL PROTECTED]
>
> __________________________________________________
> Do You Yahoo!?
> Everything you'll ever need on one web page
> from News and Sport to Email and Music Charts
> http://uk.my.yahoo.com
>
> --
> ** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/
>
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> For human help, e-mail: [EMAIL PROTECTED]
__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com
--
** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]