OK - Thanks Ray I knew it was something simple, I had tried that except on the other side of the comma.
Thanks again ----- Original Message ----- From: "Raymond Camden" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Thursday, September 05, 2002 10:33 AM Subject: RE: Error trying to create an Array > LineItemArray is a 2d array. You can't use ArraySet on a 2d array, you > must pass in a particular column, ie: > > <cfset arraySet(my2dArray[x],a,b,value)> > > ======================================================================= > Raymond Camden, ColdFusion Jedi Master for Hire > > Email : [EMAIL PROTECTED] > Yahoo IM : cfjedimaster > > "My ally is the Force, and a powerful ally it is." - Yoda > > > -----Original Message----- > > From: Larry Juncker [mailto:[EMAIL PROTECTED]] > > Sent: Thursday, September 05, 2002 11:29 AM > > To: CF-Talk > > Subject: Error trying to create an Array > > > > > > Can anyone tell me why I keep getting the following error: > > > > An error occurred while evaluating the expression: > > > > temp = ArraySet(LineItemarray,1,6,"") > > > > Error near line 47, column 7 > > > > the code that I am trying to run is below: > > > > <!--- Make an array ---> > > <cfset LineItemArray = ArrayNew(2)> > > > > <cfloop from="1" to="#LineItemCt#" index="itemRow"> > > #ListGetAT(Cust_ItmLst,ItemRow,'~')#<BR> > > > > <!--- ArrayToList will not function properly if the Array has not been > > initialized with ArraySet ---> > > <cfset temp = ArraySet(LineItemArray,1,6,"")> > > > > <!--- set some elements ---> > > <cfset LineItemArray[itemRow][1] = "#ListGetAt(Cust_ItmLst,1,' ')#"> > > <cfset LineItemArray[itemRow][2] = ""> > > > > <!--- Find out where PackageSize is located in this string ---> > > <cfset PackageSizePOS = > > ListFindNoCase(Cust_ItmLst,"PackageSize:"," ")> > > <cfloop from="2" to="#Evaluate(PackageSizePOS-1)#" index="ct"> > > <cfset LineItemArray[itemRow][2] = #LineItemArray[itemRow][2]# &' ' & > > #ListgetAt(Cust_ItmLst,ct,' ')#> > > </cfloop> > > > > <cfset LineItemArray[itemRow][3] = > > "#ListGetAt(Cust_ItmLst,PackageSizePOS+1,' ')#"> > > <cfset LineItemArray[itemRow][4] = > > "#ListGetAt(Cust_ItmLst,PackageSizePOS+2,' ')#"> > > <cfset LineItemArray[itemRow][5] = > > "#ListGetAt(Cust_ItmLst,PackageSizePOS+3,' ')#"> > > <cfset LineItemArray[itemRow][6] = > > "#ListGetAt(Cust_ItmLst,PackageSizePOS+5,' ')#"> > > > > </cfloop> > > > > <!--- is it an array? ---> > > > > <P>Is this an array? #IsArray(LineItemArray)# > > <P>It has #ArrayLen(LineItemArray)# elements. > > <P>Contents: #ArrayToList(LineItemArray)# > > <!--- the array has expanded dynamically to six elements > > with the use of ArraySet, even though we only set three values ---> > > > > > > Any quick anwsers on this would be GREATLY Appreciated. > > > > > > > ______________________________________________________________________ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/[email protected]/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

