Use array notation on the scope. <cfset varName="i"> <cfset variables[varName]=1> <cfset Form[varName]=1> Etc.
Or you can do this--works with earlier versions of CF but is not as efficient: <cfset "#varName#"=1> > -----Original Message----- > From: Robert Polickoski [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, January 01, 2003 1:23 PM > To: CF-Talk > Subject: indirect reference > > > Hello all, > > Happy New Year. I hope everyone had a safe and enjoyable holiday. > > I am trying to set a variable indirectly, i.e., I have a variable > that contains the name of the variable I want to set. How do you > accomplish this? > > Thank you in advance. > > Robert J. Polickoski > Senior Programmer, ISRD Inc. > (540) 842-6339 > [EMAIL PROTECTED] > AIM - RobertJFP > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Get the mailserver that powers this list at http://www.coolfusion.com