Thanks Gunther,

... that worked well once I initialized the Array.

At 09:32 AM 7/23/03 +1000, you wrote:

>use a jagged two dim array?
>
>Arrays = ArrayNew(1)
><cfloop... i
>         <cfset AryName[i] = ArrayNew(1)>
>         <cfloop... j
>                 <cfset AryName[i][j] = Somedata.field[j]>
>         </cfloop>
></cfloop>
>
>-----Original Message-----
>From: Brrrian [mailto:[EMAIL PROTECTED]
>Sent: Wednesday, 23 July 2003 9:24 AM
>To: CF-Talk
>Subject: RE: dynamic naming???
>
>
>Thanks Matthew,
>Unfortunately both of those ideas get:Invalid CFML construct found on line
>156 at column
>;(
>
>At 10:48 AM 7/23/03 +1200, you wrote:
>
> >Have you tried
> ><cfset "AryName#j#"[i] = Somedata.field[j]>
> >
> >If that don't work how about
> >
> ><cfset variables["AryName#j#"][i] = Somedata.field[j]>
> >
> >
> > > -----Original Message-----
> > > From: Brrrian [mailto:[EMAIL PROTECTED]
> > > Sent: Wednesday, 23 July 2003 9:47 a.m.
> > > To: CF-Talk
> > > Subject: dynamic naming???
> > >
> > > trying to dynamically populate several 1 dimension arrays...
> > >
> > > AryName1
> > > AryName2
> > > AryName3
> > > AryNameN...
> > >
> > > I create the N...Arrays with ArrayNew(1) and then try a loop to populate
> > >
> > > <cfloop...
> > > <cfset AryName#j#[i] = Somedata.field[j]>
> > > </cfloop>
> > >
> > > Gets:Invalid CFML construct found on line 156 at column 49.
> > >
> > > or
> > >
> > > <cfloop...
> > > <cfset "AryName#j#[i]" = Somedata.field[j]>
> > > </cfloop>
> > >
> > > Gets:The string "NewColNum1[i]" is not a valid ColdFusion variable name.
> > >
> > > or
> > >
> > > <cfloop...
> > > <cfset theAryName = "NewColNum"&#j#>
> > > <cfset theAryName = Somedata.field[j]>
> > > </cfloop>
> > >
> > > Gets:You have attempted to dereference a scalar variable of type class
> > > java.lang.String as a structure with members.
> > >
> > >
> >
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

Get the mailserver that powers this list at 
http://www.coolfusion.com

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to