[thelist] CF: Values from Dynamically Generated Col Names?!

Scott Brady evolt at scottbrady.net
Mon Jan 5 09:40:48 CST 2004

Original Message:
> From: Frank <lists at frankmarion.com>

> <cfloop query="categories"> <!--- Builds the rows --->
>     <cfloop index="cnt" from="1" to="100"> <!--- Builds the columns --->
>        <cfset cell_name="c_#NumberFormat(cnt, '000')#">
>        <input type="text" name="#cell_name#" value="#cell_name#">
>     </cfloop>
> </cfloop>
> I've tried a variety of absurdities such as 
> #Evaluate(DE('categories.'&cell_name))# with no luck. Ideally, the correct 
> behaviour would be that when the document loads, that correct query values 
> are inserted into the text-input field ('x' or '').

First, I want to make sure I'm answering what I think you're asking.  Basically, the query returns columns called "c_001", "c_002", ... "c_100", right?

If so, this should work:


Scott Brady

More information about the thelist mailing list