Good question Scott, the recordcount of qResults will always be 1. FYI,
adding the [1] worked!


Thanks!

-----Original Message-----
From: Scott Brady [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 16, 2003 3:05 PM
To: CF-Talk
Subject: re: Dynamic variable names in QuerySetCell

Original Message:
> From: Ryan Kime <[EMAIL PROTECTED]>
> <cfloop index="LoopCount" from="1" to="12">
>     <cfset QuerySetCell(Monthly2003, "month", curMonth, LoopCount)>
>     <cfset QuerySetCell(Monthly2003, "dollar_amount",
> qResults["val"&LoopCount], LoopCount)>
> </cfloop>
>  
>  
> The second QuerySetCell is what is killing me. It gives the wretched,
> "Complex objects cannot be converted to simple values" error.

How many rows does "qResults" turn?

I think what you need is qResults["val" & loopCount][1]  to get just the
first row's "val1" value (even if the query only returns 1 row).

It's just an educated guess, but it's worth a shot.

Scott

---------------------------
Scott Brady
http://www.scottbrady.net/ <http://www.scottbrady.net/>  
  _____
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to