OK. if that's the case (the IDs changing), the arrayAppend() with appending a 1d array onto your existing 2d array should work.
? On 5/30/07, Scott Stewart <[EMAIL PROTECTED]> wrote: > The id does change, > > What I want to end up with is something like this > > Narrowed by: > > List of terms > > Blah > Yadda > Humenah > > <click> > > Narrowed By > Blah [x] > > List of terms > > Blah > Yadda > Humenah > > <Click on next term> > Narrowed By: > Blah [x] > Yadda [x] > > List of terms > > Blah > Yadda > Humenah > > > > Each click generates a new search id (it's something to do with the Lucene > search engine, I came in after this was built) when it's deleted it goes > back to the previous search. > > I hope this makes sense.. > > -- > Scott Stewart > ColdFusion Developer > > SSTWebworks > 7241 Jillspring Ct. > Springfield, Va. 22152 > (703) 220-2835 > > http://www.sstwebworks.com > > -----Original Message----- > From: Charlie Griefer [mailto:[EMAIL PROTECTED] > Sent: Wednesday, May 30, 2007 12:55 PM > To: CF-Talk > Subject: Re: Array Append on a two dimensional array > > curious... why not store it as a struct? you can have a key for ID, > and a key for searchTerms (the latter being an array). > > unless i'm misunderstanding, the "ID" value will not change (?) so > there's no reason to keep appending to a 2d array. > > On 5/30/07, Charlie Griefer <[EMAIL PROTECTED]> wrote: > > in CF a 2d array is just a 1d array of 1d arrays. > > > > append a 1d array to your existing 2d array. > > > > run this code: > > > > <cfset myArray = arrayNew(2) /> > > > > <cfset myArray[1][1] = "id1" /> > > <cfset myArray[1][2] = "searchTerm1" /> > > > > <cfdump var="#myArray#" label="myArray" /> > > > > <cfset arrayToAppend = arrayNew(1) /> > > <cfset arrayToAppend[1] = "id2" /> > > <cfset arrayToAppend[2] = "searchTerm2" /> > > > > <cfset arrayAppend(myArray, arrayToAppend) /> > > > > <cfdump var="#myArray#" label="myArray (appended)" /> > > > > On 5/30/07, Scott Stewart <[EMAIL PROTECTED]> wrote: > > > Hey all, > > > > > > > > > > > > I'm building a "Narrowed By" chunk. > > > > > > > > > > > > There's a list of terms that a user can narrow by, when they click on a > term > > > I want to > > > > > > List, the terms that they've used, along with an delete graphic. Each > time > > > they click a new term is added to the array > > > > > > Each time a term is deleted it's removed from the array. The id is > retained > > > so that the search id can be tracked. > > > > > > > > > > > > > > > > > > I have an array that looks like this > > > > > > > > > > > > searchArray = ArrayNew(2) > > > > > > searchArray[1][1] = id(guid passed through the url) > > > > > > searchArray[1][2] = term(search term passed through the url) > > > > > > > > > > > > So how do I do an ArrayAppend on a two dimesional array? > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > > > Scott Stewart > > > > > > ColdFusion Developer > > > > > > > > > > > > SSTWebworks > > > > > > 7241 Jillspring Ct. > > > > > > Springfield, Va. 22152 > > > > > > (703) 220-2835 > > > > > > > > > > > > http://www.sstwebworks.com > > > > > > > > > > > > > > > > > > > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| ColdFusion MX7 by AdobeĀ® Dyncamically transform webcontent into Adobe PDF with new ColdFusion MX7. Free Trial. http://www.adobe.com/products/coldfusion?sdid=RVJV Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:279605 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4