Ruslan,

>
> 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.nam
> e#_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.
>


<Cfoutput>#iif(isDefined("Attributes.display"),Trim(attributes.name&"_query.
"&attributes.display),DE(''))#</cfoutput>

will return the contents of the variable created from the bit in trim().
Put a DE() around the trim() and you'll get the variable name that was
created.

Regards

Stephen


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to