To use a non-standard name like that you will need to use bracket notation.

<cfoutput>#form["name" & id]#</cfoutput>


--------------
Ian Skinner
Web Programmer
BloodSource
www.BloodSource.org
Sacramento, CA

"C code. C code run. Run code run. Please!"
- Cynthia Dunning



...-----Original Message-----
...From: Butch Zaccheo [mailto:[EMAIL PROTECTED]
...Sent: Thursday, January 06, 2005 3:54 PM
...To: CF-Talk
...Subject: variables and dashes
...
...Hi,
...
...I�m sure this is a simple question, but I can�t figure it out for some
...reason.
...
...I have a form variable form.name.
...
...I add an id on the end to associate the field to an item in my database.
...example: form.name#ID# =  form.name0CDE59B0-D9D7-2DD3-F28C19C88DDC1EC2
...
...when I try and reference the form field on a different page I get
...problems.
...example: <cfqueryparam cfsqltype="cf_sql_varchar"
...value="#Evaluate("name"&)#ID#">
...
...It gives me an error like this:
... "D9D7," on line 1, column 19, is not a valid identifier name.
...
...The CFML compiler was processing:
...an expression beginning with "name0CDE59B0", on line 1, column 1.This
...message is usually caused by a problem in the expressions structure.
...
...I know the dashes are giving me the problem. What can I do to generate
...the
...name of the form field I want using a UUID without dashes being a
...problem.
...Is there a way to make evaluate add the ID and ignore the dashes?
...
...Any help would be much appreciated.
...
...Thanx
...
...Bzaccheo
...
...
...

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Protect your mail server with built in anti-virus protection. It's not only 
good for you, it's good for everybody.
http://www.houseoffusion.com/banners/view.cfm?bannerid=39

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:189593
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to