<cfset var aOuter = arrayNew(1) /> <!--- outer loop --> <cfset outer[index] = structNew() \ /> ... <cfset outer[index].aInner = arrayNew(1) /> ... <!--- inner loop --> <cfset outer[index].aInner[index2] = 'X' /> ... <!-- end inner loop --> ... <!-- end outer loop -->
On Wed, Mar 3, 2010 at 1:44 PM, Laurence MacNeill <[email protected]>wrote: > Thanks for all the tips, guys... Gave me a couple of ideas... > > Here's a blog-post that kind of deals with this issue, only he's using LINQ > and .net 3.5, whereas I need to use CF9... > > http://justinjmoses.wordpress.com/2008/10/10/flex-dynamic-bindable-value-objects/ > > I can certainly copy what he's doing in his database, where the customized > fields are stored in a separate DB. I'm thinking that having CF9 return > those fields in an associative array, or perhaps two arrays (one with the > field names and one with the field values, in the same order of course) > might work for this... > > However, I've tried nesting an array within an array before, and I couldn't > get it to work. (For example, I wanted an array of VOs, with each VO > containing one field that was itself an array). CF kept acting like I was > trying to create a two-dimensional array, rather than nesting a > 1-dimensional array within another 1-dimensional array. Gave me all kinds > of error messages that I never could figure out... > > So if there's anyone out there who knows how to nest an array within an > array in CF9, I'd greatly appreciate some advice here... > > Thanks a bunch, > L. > > > > > ------------------------------------------------------------- > To unsubscribe from this list, simply email the list with unsubscribe in > the subject line > > For more info, see http://www.affug.com > Archive @ http://www.mail-archive.com/discussion%40affug.com/ > List hosted by http://www.fusionlink.com > ------------------------------------------------------------- > > > -- Darin Kohles RIA Developer
