Thanks Isaac! That worked like a charm. You guys are awesome....
Melanie
----- Original Message -----
From: "Smith, Melanie" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Wednesday, July 24, 2002 2:03 PM
Subject: problems with evaluate and punctuation characters
> I've had some code that's been working fine until someone decided to start
> adding dashes to some of the key field codes.
>
> Here's the code on the action page:
>
> <cfloop index="doc" list="#form.check#">
>
> <cfquery name="addtorec" datasource="docs">
> insert into tblemployee_train(employeeno,fullfileid,deptcode,dateadded)
> values(#evaluate('form.empid' & doc)#,'#evaluate('form.fullfileid'&
> doc)#','#evaluate('form.deptcode'& doc)#',#Now()#)
> </cfquery>
> </cfloop>
>
> Now when it hits the action page code above with a deptcode selected that
> contains a dash, I get this error upon processing:
>
> Error Occurred While Processing Request
>
> Error Diagnostic Information An error occurred while evaluating the
> expression: #evaluate('form.empid' & doc)# Error near line 17, column 9.
> An error has occurred while processing the expression:
> form.empid40063GI30003GIXXX-XX
>
> Error near line 1, column 28. Error resolving parameter
> FORM.EMPID40063GI30003GIXXX The specified form field cannot be found.
This
> problem is very likely due to the fact that you have misspelled the form
> field name. The error occurred while processing an element with a general
> identifier of (#evaluate('form.empid' & doc)#), occupying document
position
> ...
>
> All of the field names and values look fine when debugging is on, so it
has
> something to do with that evaluate command and how it parses it out.
>
> Anyone had a similar problem? What can I do to fix it other than inform
my
> end users they can't use dashes? Thanks a bunch to anyone that can answer
> this!! (CF 4.5 by the way).
>
> Melanie
>
Date: Wed, 24 Jul 2002 17:14:55 -0400
From: S. Isaac Dealey <[EMAIL PROTECTED]>
Subject: Re: problems with evaluate and punctuation characters
Message-ID: <[EMAIL PROTECTED]>
You need array-notation syntax there... which will allow you to put just
about _anything_ in those fields...
<cfloop index="doc" list="#form.check#">
<cfquery name="addtorec" datasource="docs">
insert into tblemployee_train
(employeeno,fullfileid,deptcode,dateadded)
values( #form["empid#doc#"]#,
'#form["fullfileid#doc#"]#',
'#form["deptcode#doc#"]#',
#now()#)
</cfquery>
</cfloop>
hth
Isaac
www.turnkey.to
954-776-0046
______________________________________________________________________
This list and all House of Fusion resources hosted by CFHosting.com. The place for
dependable ColdFusion Hosting.
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists