I think you have 2 too many #'s in there. You can also try
#iif(isDefined("Attributes.display"),DE(RTrim("#Chr(35)##attributes.name#_qu
ery.#
attributes.display##Chr(35)#")),DE(""))#
Chr(35) = #
Blessed Be,
--Katrina Chapman
http://www.katrinachapman.com
http://www.cfchick.com
-----Original Message-----
From: Ruslan Sivak [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 25, 2001 4:05 PM
To: CF-Talk
Subject: iif usage
I'm using iif, and running into some weird things. Well first of all I'm
generating CF on the fly, so I need to escape # so that the variables don't
get evaluated until they are in the generated file. For example I'm using
something like this. Is this the right way to do it or is there an easier
way?
#iif(isDefined("Attributes.display"),DE(RTrim("#####attributes.name#_query.#
attributes.display#####")),DE(""))#
Do I really need the 5 pound signs? Attributes.name is getting evaluated
right now, and so is attributes.display. Lets say Attributes.name is
"first" and attributes.display" is "first_name" then it should return
#first_query.first_name# with the pound signs around it.
Ruslan Sivak
Technologist
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists