> I have a recordset that has several attendees. I need to
> create variables on the fly for each record cause I won't
> know how many there are. It can be infinite (everyone on the
> planet). Of course, the problem is that I can't use an
> evaluate on the left side. I can't think of a way around
> this. I'll need fname_1,fname_2,fname_3,fname_n etc.
>
> Here's my most recent failure:
> <cfloop from="1" to="#getAttendees.recordCount#" index="aa">
> <cfset evaluate("fname_#aa#") = getAttendees.fname[aa]>
> </cfloop>
How about using an array and looping over the query:
<cfset FirstName = ArrayNew(1)>
<cfloop query="getAttendees">
<cfset ArrayAppend(FirstName,fName)>
</cfloop>
Then you could access them with:
FirstName[1], FirstName[2], etc.
Andy
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four
times a year.
http://www.fusionauthority.com/quarterly
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:259039
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4