Thanx for the info Ian... The first example works well. I eliminated the
evaluate function.
On 1/6/05 4:07 PM, "Ian Skinner" <[EMAIL PROTECTED]> wrote:
> Well, umm I would not use evaluate, if I could at all avoid it. The bracket
> notation is generally considered superior to evaluate.
>
> But if you insist, I think the right parenthesis was out of place in your
> code. It should go around the name string and ID variable. Also, it looks
> like you where missing a #. You only had three and they usually come in
> matched pairs.
>
> Anyway how I would do it.
> <cfqueryparam cfsqltype="cf_sql_varchar" value="#form['name' & ID]#">
>
> If you insist on evaluate, I think this may work.
> <cfqueryparam cfsqltype="cf_sql_varchar" value="#Evaluate("name"&#ID#")#>
>
> --------------
> 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 4:01 PM
> ...To: CF-Talk
> ...Subject: Re: variables and dashes
> ...
> ...How would it look using evaluate?
> ...
> ...On 1/6/05 3:57 PM, "Ian Skinner" <[EMAIL PROTECTED]> wrote:
> ...
> ...> 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
> ...> ...
> ...> ...
> ...> ...
> ...>
> ...>
> ...
> ...
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble
Ticket application
http://www.houseoffusion.com/banners/view.cfm?bannerid=48
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:189596
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