#iif(qryCustomer.allareas,"All Areas"," '#ValueList(qryAreas.name,', ')#' ")#
Doesn't work either. Parameter 1 of function ValueList which is now "qryAreas.name" must be pointing to a valid query name Russ -----Original Message----- From: Joe Eugene [mailto:[EMAIL PROTECTED]] Sent: Sunday, September 08, 2002 5:49 PM To: CF-Talk Subject: Re: iif usage qryCustomer.allareas should be a "0" or any number other than "0" which is True your statment should look like below.. u dont need "DE" #IIF(qryCustomer.allareas," 'All Areas' "," '#ValueList(qryAreas.name,',')#' ")# Which means if qryCustomer.allareas !=0 ...display "ALL Areas" else Display qryAreas.name list.. Joe ----- Original Message ----- From: "Ruslan Sivak" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Sunday, September 08, 2002 5:24 PM Subject: iif usage > Hi, I'm having a problem with iif. > > If I do > > #iif(qryCustomer.allareas,DE("All > Areas"),DE("#ValueList(qryAreas.name,', ')#"))# > > and qryCustomer.allareas is true, therefore qryAreas is undefined (I > check for it with an cfif somewhere else), then I get an error > "Parameter 1 of function ValueList which is now "qryAreas.name" must be > pointing to a valid query name" > > If I make it > > #iif(qryCustomer.allareas,DE("All Areas"),DE("ValueList(qryAreas.name,', > ')"))# > > then it works fine in this case, but fails when qryCustomer.allareas is > false as it doesn't evaluate the ValueList(qryAreas.name,', ') > > What am I doing wrong? > > Russ > > ______________________________________________________________________ This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists