Actually I get the same error even without the AND "". I've used the
IsDefined AND IS NOT "" together before without any problem since the AND
part is only used if the first IsDefined part evals to true. For example
"varA exists and it is NOT empty". Where I could see the is not "" part
causing a problem is if I used an OR. Which mean  "varA exists OR varA is
NOT empty". Am I way off on this thinking?

If I make a slight modification for the code to read:

<cfset myCClist = "boo">

#iif(IsDefined("myCClist") AND myCClist IS NOT "", DE("cc=""#myCClist#"""),
DE("empty"))#

it works and returns "boo"

If I remove the boo from the cfset and simply leave "" i.e.

<cfset myCClist = "">

#iif(IsDefined("myCClist") AND myCClist IS NOT "", DE("cc=""#myCClist#"""),
DE("empty"))#

Then this returns "empty"

BUT if I remove the cfset then the statement craps-out with the error
resolving param. I tried using the full scope as Terry suggested but that
made no difference.

Any additional thoughts, ideas, suggestions, etc?

> From: Steve Budan <[EMAIL PROTECTED]>
> Reply-To: [EMAIL PROTECTED]
> Date: Thu, 23 May 2002 11:38:14 -0400
> To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>
> Subject: RE: [CFTALKTor] iif error
> 
> isDefined + and for the same var. if its not defined, you are still trying
> to evaluate it to see if it equial to "". So its not defined and you get
> your error.
> 
> If you are using Homesite or Studio, put your cursor on the IIF and hit F1.
> You'll get the above explanation plus more.
> 
> -steve
> 
> -----Original Message-----
> From: A. Karl Zarudny [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, May 23, 2002 11:32 AM
> To: [EMAIL PROTECTED]
> Subject: [CFTALKTor] iif error
> 
> 
> Hi everybody.
> 
> Any insight as to why
> 
> iif(IsDefined("myCClist") AND myCClist IS NOT "", DE("cc=""#myCClist#" ""),
> DE(""))#
> 
> would be returning the following error?
> 
> 
> 
> An error occurred while evaluating the expression:
> 
> 
> #iif(IsDefined("myCClist") AND myCClist IS NOT "", DE("cc=""#myCClist#"""),
> DE(""))#
> 
> 
> Error near line 280, column 3.
> ------------------------------------------------------------------------
> 
> Error resolving parameter MYCCLIST
> 
> 
> ColdFusion was unable to determine the value of the parameter. This problem
> is very likely due to the fact that either:
> 
> 1.    You have misspelled the parameter name, or
> 2.    You have not specified a QUERY attribute for a CFOUTPUT, CFMAIL, or
> CFTABLE tag.
> 
> 
> The error occurred while processing an element with a general identifier of
> (#iif(IsDefined("myCClist") AND myCClist IS NOT "", DE("cc=""#myCClist#"""),
> DE(""))#), occupying document position...
> 
> Is there a better way for me to do the same thing? This piece of code as I'm
> sure you can guess, is going within a cfmail tag. myCClist is cfset and does
> not result from a query. But regardless my thinking is that iif'ing with
> "IsDefined" is checking for myCClist's existence and it having values.... OR
> am I once again falling victim to sleep deprivation?
> 
> Thanks,
> Karl
> 
> -
> You are subscribed to the CFUGToronto CFTALK ListSRV.
> This message has been posted by: "A. Karl Zarudny"
> <[EMAIL PROTECTED]>
> To Unsubscribe, Please Visit and Login to http://www.CFUGToronto.org/
> Manager: Kevin Towes ([EMAIL PROTECTED]) http://www.CFUGToronto.org/
> This System has been donated by Infopreneur, Inc.
> (http://www.infopreneur.net)
> -
> You are subscribed to the CFUGToronto CFTALK ListSRV.
> This message has been posted by: Steve Budan <[EMAIL PROTECTED]>
> To Unsubscribe, Please Visit and Login to http://www.CFUGToronto.org/
> Manager: Kevin Towes ([EMAIL PROTECTED]) http://www.CFUGToronto.org/
> This System has been donated by Infopreneur, Inc.
> (http://www.infopreneur.net)

-
You are subscribed to the CFUGToronto CFTALK ListSRV.
This message has been posted by: "A. Karl Zarudny" <[EMAIL PROTECTED]>
To Unsubscribe, Please Visit and Login to http://www.CFUGToronto.org/
Manager: Kevin Towes ([EMAIL PROTECTED]) http://www.CFUGToronto.org/
This System has been donated by Infopreneur, Inc.
(http://www.infopreneur.net)

Reply via email to