Great, thanks. I was nearly there... been working on JavaScript for so long today I think it's affected my brain!
Kay. "Pascal Peters" <[EMAIL PROTECTED]> wrote in message news:<[EMAIL PROTECTED]>... > <cfset payment = StructNew()> > <cfloop query="due"> > <cfset payment[due.pkWebUser] = StructNew()> > <cfset payment[due.pkWebUser].key1 = due.col2> > <cfset payment[due.pkWebUser].key2 = due.col3> > <cfset payment[due.pkWebUser].key3 = due.col4> > </cfloop> > > Pascal > -----Original Message----- > From: Kay Smoljak [mailto:[EMAIL PROTECTED]] > Sent: donderdag 11 april 2002 11:11 > To: CF-Talk > Subject: Dynamic structure key names > > > Hi all, > > I'm stuck on the syntax for this. I have a structure. What I'm trying > to do is loop over a query, and create a new structure (dynamically > named with the primary key of the record as a structure key) with > three values from that record. I think I must be doing something wrong > syntax-wise, and I can't find any examples in the docs or the > archives. > > I have tried these (within a query loop): > <cfset payment.[due.pkWebUser] = StructNew()> > <cfset payment.evaluate(due.pkWebUser) = StructNew()> > <cfset payment.#due.pkWebUser# = StructNew()> > > But nothing is working so far. Any ideas on how to do this or how it > can be done easier? > > Kay. > > ______________________________________________________ > Kay Smoljak - ColdFusion Developer - PerthWeb Pty Ltd > > Level 9/105 St George's Terrace - Perth - Western Australia > Ph: (08) 9226 1366 Fax: (08) 9226 1375 www.perthweb.com.au > > http://developer.perthweb.com.au - Tools for Developers cfx_pwcamtech > | cfx_pwimageproc | cfx_pwcardcyrpt > > > > > > > ______________________________________________________________________ Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm 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

