All:

I've run into a problem that I could use some new eyes on... I have a function 
inside a CFC that accepts a query (importData) and a series of indicators 
(nicknameInd) that indicate if the value from the query should be used 
(indicator = 1) or not (indicator = 0).  In the below code, the first argument 
in the IIF() function evaluates to false (both conditions are false) so only 
the third argument, De(""), should be evaluated.  However, for some reason, 
both the second and third arguments are being evaluated and I'm getting an 
error message that "Element NICKNAME is undefined in IMPORTDATA." Because 
importData.nickname is not defined.

<cfset variables.nickname = Iif( (arguments.nicknameInd NEQ 0) AND 
(IsDefined("importData.nickname")), De(importData.Nickname), De(""))>

I've replaced both the second and third arguments with debugging code that 
showed that they are both being evaluated, regardless of the condition in the 
first argument.  Not sure why that is though given that they're both wrapped in 
DE() functions.

Any suggestions?

Thanks.

--
Mosh Teitelbaum



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:360045
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to