Guest_imported
New member
- Jan 1, 1970
- 0
Can someone please advice how I can populate a Multi-dimensional array?
I have tried the following as AppendArray (I think!) only refers to 1D Arrays:
<CFSET TEMP = ArrayLen(RESULTS) + 1>
<CFSET RESULTS[1][#TEMP#] = #BAND_1_START#>
<CFSET RESULTS[2][#TEMP#] = #BAND_1_END#>
<CFSET RESULTS[3][#TEMP#] = #BAND1.RecordCount#>
I have looked at others examples where they had similar problems but I am unsure which value refers to the dimension and which refers to the element/row.
I am obtaining the following error when this script is run:
Error Diagnostic Information
An error occurred while evaluating the expression:
RESULTS[1][#TEMP#] = #BAND_3_START#
Error near line 146, column 19.
--------------------------------------------------------------------------------
Cannot set element of indexed object
The element at position 1 of the object cannot be set. May be the object is read-only. The object has elements in positions 1 through 0.
The error is in dimension 1 of object "RESULTS".
Any help would be appreciated, Thanks
I have tried the following as AppendArray (I think!) only refers to 1D Arrays:
<CFSET TEMP = ArrayLen(RESULTS) + 1>
<CFSET RESULTS[1][#TEMP#] = #BAND_1_START#>
<CFSET RESULTS[2][#TEMP#] = #BAND_1_END#>
<CFSET RESULTS[3][#TEMP#] = #BAND1.RecordCount#>
I have looked at others examples where they had similar problems but I am unsure which value refers to the dimension and which refers to the element/row.
I am obtaining the following error when this script is run:
Error Diagnostic Information
An error occurred while evaluating the expression:
RESULTS[1][#TEMP#] = #BAND_3_START#
Error near line 146, column 19.
--------------------------------------------------------------------------------
Cannot set element of indexed object
The element at position 1 of the object cannot be set. May be the object is read-only. The object has elements in positions 1 through 0.
The error is in dimension 1 of object "RESULTS".
Any help would be appreciated, Thanks