OH!  Just Got it.... used the earlier suggestion of James for Variables
Scope...
so this is what is working now.

<cfloop index="i" from="1" to="#thePBinsCount.RecordCount#">
 <cfset nColumnNumber = QueryAddColumn(WIP1, "thePBinName#i#",
Variables["PBinNameArray" & i])>
 <cfset nColumnNumber = QueryAddColumn(WIP1, "thePBinQty#i#",
Variables["PBinQtyArray" & i])>
 <!---<cfset nColumnNumber = QueryAddColumn(WIP1, "thePBinQty#i#",
PBinQtyArray#i#)>--->
</cfloop>

Though I don't understand the syntax used for Variables Scope... I would
have thought something like Variables.Something would have been the
syntax... not [Something]
Regardless... whew!  Now on to logic errors ;-)

Thank you!

On Jan 11, 2008 11:44 AM, Gonzo Rock <[EMAIL PROTECTED]> wrote:

> All Right!  Got most of it... Now just the bottom piece below is still
> giving me trouble and I've tried lots of variations ;-(
>
> So Here's what I've got working thanks to James.
>
> <cfloop index="i" from="1" to="#thePBinsCount.RecordCount#">
>  <cfset "PBinNameArray#i#" = ArrayNew(1)>
>  <cfset "PBinQtyArray#i#" = ArrayNew(1)>
> </cfloop>
>  <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
>        . . .
>  </cfquery>
>  <cfloop index="j" from="1" to="#theSumBinCount.RecordCount#">
>   <cfset VARIABLES["PBinNameArray" & j][i] = theSumBinCount.Name[j]>
>   <cfset VARIABLES["PBinQtyArray" & j][i] = theSumBinCount.Qty[j]>
>  </cfloop>
> </cfloop>
> This is the last piece, where the Query gets pouplated with the new
> Columns and fails.
>
>  <cfloop index="i" from="1" to="#thePBinsCount.RecordCount#">
>  <cfset nColumnNumber = QueryAddColumn(WIP1, "thePBinName#i#",
> PBinNameArray#i#)>
>  <cfset nColumnNumber = QueryAddColumn(WIP1, "thePBinQty#i#",
> PBinQtyArray#i#)>
> </cfloop>
> It fails with this error: Template Exception - Invalid CFML construct
> found on line 174 at column 84.
>
>
> On Jan 11, 2008 3:36 AM, James Holmes <[EMAIL PROTECTED]> wrote:
>
> > There's a stray quote there. Try:
> >
> > <cfset VARIABLES["PBinNameArray" & j][i] = theSumBinCount.Name[j]>
> >
> > On Jan 11, 2008 8:16 PM, Gonzo Rock <[EMAIL PROTECTED]> wrote:
> > > Been trying that a bit... and several variations.  I can't seem to get
> > what
> > > you sent to work.
> > >
> > > <cfset VARIABLES["PBinNameArray" & j][i]" = theSumBinCount.Name[j]>
> > > Throws this error: Template Exception - Invalid CFML construct found
> > on line
> > > 172 at column 41.
> >
> > --
> > mxAjax / CFAjax docs and other useful articles:
> > http://www.bifrost.com.au/blog/
> >
> > 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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:296449
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