You can have two list loops. For the outer loop use "g" in "group" as
the list delimeter. The use ListFirst and ListLast with a : delimeter
to break apart the group label from the group values. Then loop over
the ListLast comma list of values. Also you might need a two
dimensional array or a structure of arrays since you are storing two
different types of data points.

Good luck,
Mike Chabot

On Fri, Apr 18, 2008 at 12:28 AM, Brian Sheridan
<[EMAIL PROTECTED]> wrote:
> Im not that familiar with Coldfusion and I'm learning.  I have spent alot of 
> time with no luck. Can someone please take a peek at my code and help me 
> arrange this data correctly. Any help much appreciated.
>
>
> -------------------------------------------------------------
> The data is set from a JS var and Im passing it from URL
>
> http://localhost/drag/page2.cfm?Groups=group1:%20group2:%2016,3,17group3:%202,11,18group4:%2010,7group5:%201,8,20group6:%209,15,12group7:%205,6group8:%2014,13group9:%204,19
>
> Here is what my array looks like
> --------------------------------------------------------------
> <cfset MyArray = ArrayNew(1)>
> <cfset mylist="#groups#">
> <cfloop from="1" to=#ListLen(mylist)# index="i">
> <cfset MyArray[i] = ListGetAt(mylist, i)>
> <cfoutput>#MyArray[i]#<br>
> </cfoutput></cfloop>
>
>  And here are my results:
> -------------------------------------------
> group1: group2: 16
> 3
> 17group3: 2
> 11
> 18group4: 10
> 7group5: 1
> 8
> 20group6: 9
> 15
> 12group7: 5
> 6group8: 14
> 13group9: 4
> 19
>
> THIS IS HOW I NEED TO OUTPUT...  PLEASE HELP ME.
> --------------------------------------------------
>
> Group, UserID
> group2, 16
> group2, 3
> group2, 17
> group3, 2
> group3, 11
> group3, 18
> group4, 10
> group4, 7
> group5, 1
> group5, 8
> group5, 20
> group6, 9
> group6, 15
> group6, 12
> group7, 5
> group7, 6
> group8, 14
> group8, 13
> group9, 4
> group9, 19
>
> I need the data in this format so i can place it into a database.
>
>
>
>
>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;192386516;25150098;k

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:303716
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to