Thanks people, that worked a treat.
The variable itself was a session variable so what I ended up with was
<cfoutput>
#evaluate("session." & session.application_view_list[i].name &
"_red")#
</cfoutput>
I decided to just drop the intermediate countvar step...
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 25, 2001 2:18 PM
To: CF-Talk
Subject: RE: Dynamic variable construction and it's use
#Evaluate(session.application_view_list[i].name & "_red")# would ouptut the
value.
So would #evaluate(countvar)#
Rick
-----Original Message-----
From: Kevin Gilchrist [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 25, 2001 12:42 PM
To: CF-Talk
Subject: Dynamic variable construction and it's use
Hi there,
If construct a variable name dynamically like;
<cfset countvar="#session.application_view_list[i].name#_red">
How do I then output the contents of the newly constructed variable?
If the code above evaluated to a variable name e.g. "oracledb_red", how
would I do the equivalent of
<cfoutput>
#oracledb_red#
</cfoutput>
Doing
<cfoutput>
#countvar#
</cfoutput>
will obviously just output the new variable name but not it's contents.
I've tried various permutations of #'s and quotes but can't seem to get it
right.
Is there a way to do this?
Thanks,
Kevin
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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