Use the scope of the variables to specify the name. E.g. if this is in
a .cfm file, the VARIABLES scope will do:

<cfset "PBinNameArray#j#[#i#]" = theSumBinCount.Name[j]>

becomes

<cfset VARIABLES["PBinNameArray" & j][i]" = theSumBinCount.Name[j]>

On Jan 11, 2008 3:49 PM, Gonzo Rock <[EMAIL PROTECTED]> wrote:
> I've been struggling with this all day now... time to ask for help again.
>
> I can set ArrayNames Dynamically like this:
>
> <cfloop index="i" from="1" to="#thePBinsCount.RecordCount#">
>         <cfset "PBinNameArray#i#" = ArrayNew(1)>
>         <cfset "PBinQtyArray#i#" = ArrayNew(1)>
> </cfloop>
>
> But when I try to fill them them like below I get this error:
> The Expression Exception - in line 172 The string "PBinNameArray1[1]" is not
> a valid ColdFusion variable name.
>
> <cfloop index="i" from="1" to="#WIP1.RecordCount#">
>         <cfquery datasource="#request.theDSN#" name="theSumBinCount">
>                 SELECT PBin.Name, Device.Lot_Num, SUM(PBinD.Qty) AS Qty
>                 FROM PBinD
>         </cfquery>
>         <cfloop index="j" from="1" to="#theSumBinCount.RecordCount#">
>                 <cfset "PBinNameArray#j#[#i#]" = theSumBinCount.Name[j]>
>                 <cfset "PBinQtyArray#j#[#i#]" = theSumBinCount.Qty[j]>
>         </cfloop>
> </cfloop>
>
> Thank you,
> Gonzo
>
>
> 

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

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

Reply via email to