I have the following
code:
<CFLOOP
LIST="#Fieldnames#" INDEX="CurrentField">
<CFLOOP LIST="#Form.AnswerID#" INDEX="AID">
<CFIF CurrentField CONTAINS "Question_Freetext_">
<CFIF Len(Trim(Evaluate(CurrentField))) GT 0>
<CFSET FormattedField = Replace(Evaluate(CurrentField), "'", "''", "ALL")>
<CFQUERY DATASOURCE="DOCUMENTATION">
UPDATE Answers
SET Answer = '#FormattedField#'
Where AnswerID = #AID#
</CFQUERY>
</CFIF>
<CFLOOP LIST="#Form.AnswerID#" INDEX="AID">
<CFIF CurrentField CONTAINS "Question_Freetext_">
<CFIF Len(Trim(Evaluate(CurrentField))) GT 0>
<CFSET FormattedField = Replace(Evaluate(CurrentField), "'", "''", "ALL")>
<CFQUERY DATASOURCE="DOCUMENTATION">
UPDATE Answers
SET Answer = '#FormattedField#'
Where AnswerID = #AID#
</CFQUERY>
</CFIF>
</cfif>
What is happening is
that when I run this submit the form, all of the fields get updates like they
should, except that all fields are being updated to whatever the last field
value is. I am not sure why this is. ANyone out there that can assist? Also, if
I am not being clear enough, let me know and I will try to explain
better.
Thanks,
Bruce Sorge
Portal Services
Baylor Health Care
Systems
Phone: 214-820-3142
Sorge, Bruce.vcf