listGetAt error
Good morning all,
I am using this code:
<cfif listlen(list1) gt 0>
Units:
<cfloop from="1" to="#listlen(list1)#" index="j">
<cfoutput>#listGetAt(list1, j)# </cfoutput>
</cfloop>
<br />
Defect Codes:
<cfloop from="1" to="#listlen(list2)#" index="k">
<cfoutput>#listGetAt(list2, k)#</cfoutput>
</cfloop>
</cfif>
I keep getting this error:
In function ListGetAt(list, index [, delimiters]), the value of index, 6, is not a valid as the first argument (this list has 5 elements). Valid indexes are in the range 1 through the number of elements in the list.
Has anyone resolved this issue?
Thanks in advance,
DJ Khalif
