I have a data entry page which allows the user to either update or bypass actl_perf_amt. This, and a number of other hidden fields, are then passed to an UpdatePerf (Action Page) in a comma delimited list. I first use the ListContains to cull out any bypasses (BypassMthCheck). I then want to save ALL changes with one submit. When I try to update I get the following error message:
An error occurred while evaluating the expression:
msur_actl_perf_amt = #ListGetAt(form.actl_perf_amt, ListRead, ","

Error near line 18, column 8.
In function ListGetAt(list, index [, delimiters]) the value of index, which is 2, is not a valid index for the list given as a the first argument (this list has 1 elements). Valid indexes are in the range 1 through the number of elements in the list
My action page is as follows:
<CFTRANSACTION>
<CFLOOP Index="ListRead"
From ="1" To="#FormrecCount#">
<CFIF NOT parameterExists (BypassMthCheck)>
<CFSET ignore_month = "N">
<CFSET msur_actl_perf_amt = #ListGetAt(form.actl_perf_amt, ListRead, ","

<CFELSEIF ListContains(BypassMthCheck, ListRead, ","

<CFSET ignore_month = "N">
<CFSET msur_actl_perf_amt = #ListGetAt(form.actl_perf_amt, ListRead, ","

<CFELSE>
<CFSET ignore_month = "Y">
<CFSET msur_actl_perf_amt = 0>
</CFIF>
…
<CFSET actl_perf_amt = #ListGetAt(form.msur_actl_perf_amt, ListRead, ","

<CFIF #GetPerf.RecordCount# IS 0>
<CFQUERY NAME="InsertPerf" DATASOURCE="PGM">
INSERT INTO Performance(perf_date, actl_perf_amt…)
VALUES (#ODBCSelectedDate#, #msur_actl_perf_amt#…')
</CFQUERY>
<CFELSE>
<CFQUERY NAME="UpdtPerf" DATASOURCE="PGM">
UPDATE Performance
SET ignore_month = '#ignore_month#',
actl_perf_amt = #msur_actl_perf_amt#
WHERE ….
</CFQUERY>
</CFIF>
</CFQUERY>
</CFLOOP>
</CFTRANSACTION>
<CFINCLUDE TEMPLATE="UpdateDetail.cfm">