D J
asked on
ColdFusion Help with update statement
I have a working update statement that updates more than one record at a time (with one table) and need to alter to accommodate another table of alterations, meaning some records of the main table have a alteration record attached and some don't.
I'm using counter for multiple inputs:
<cfloop from="1" to="#form.numOfFields#" index="counter">
<!--- extract values of form fields --->
<cfset variables.keyID = FORM["keyid_"& counter]>
<cfset variables.date = FORM["date_"& counter]>
Problem:
When I added this statement, to receive inputs for the alteration table, I receive errors due to not all records from the main table, have records from the alteration table:
<cfset variables.AlterationTabled ate = FORM["REC_DATE_B"& counter]>
This statement works when all records being displayed have an alteration record.
Error received if all records displayed do not have an alteration record:
Element DATE_B2 is undefined in a Java object of type class coldfusion.filter.FormScop e.
How can I make this update statement work when not all records of the main table have an alternate record attached?
I'm using counter for multiple inputs:
<cfloop from="1" to="#form.numOfFields#" index="counter">
<!--- extract values of form fields --->
<cfset variables.keyID = FORM["keyid_"& counter]>
<cfset variables.date = FORM["date_"& counter]>
Problem:
When I added this statement, to receive inputs for the alteration table, I receive errors due to not all records from the main table, have records from the alteration table:
<cfset variables.AlterationTabled
This statement works when all records being displayed have an alteration record.
Error received if all records displayed do not have an alteration record:
Element DATE_B2 is undefined in a Java object of type class coldfusion.filter.FormScop
How can I make this update statement work when not all records of the main table have an alternate record attached?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER