Im having a problem linking a variable name to a list name, and cant figure
out a way around this. Basically I have a List of Cities and each City in
the Cities List has its own List. I have 2 loops, the outer loop processes
one City at a time and the inner loop process's the list for the current
city.
This is the code Im basically using (trimmed down), the Cities and Cities
Names Lists are dynamic and will vary based on other queries:
<cfset Cities = "Atlanta,Dallas">
<cfset Atlanta = "AB1,AB2,AB3,AB4">
<cfset Dallas = "DB1,DB2,DB3,DB4,DB5,DB6,DB7">
<cfset Loop1Count = 1>
<cfloop index="i1" from="1" to="#ListLen(Cities)#">
<cfset SingleCity = listgetat(Cities, #Loop1Count#)>
<cfset SingleCityList = #SingleCity#)>
<!--- I need to somehow connect the City with it associated list. I know
this does not work, SingleCityList ends up being Atlanta rather than the
Atlanta List (AB1,AB2,AB3,AB4).
--->
<cfloop index="i2" from="1" to="#ListLen(singlecitylist)#">
Do some processing
<!--- I need to have the Atlanta List available in this loop for
processing --->
</cfloop>
<cfset Loop1Count = Loop1Count +1>
</cfloop>
There must be some way around this, Ive tried putting the lists into an
Array (Im new to arrays) but a had a problem because each list was not the
same length. Any recommendations on how to accomplish this...?
Thanks,Adrian
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.