a query is a struct of arrays with each struct key representing a query
column, so to reference the value for a specific row you would say:
qdata.column[number]
You probably already know that struct keys can be accessed like so:
struct["keyname"]. Given that a query is a struct of arrays then
'qdata[form.toplevel]' would simply return a pointer to an array - which can
be passed around (passed to your UDF), but never output.
+-----------------------------------------------+
Bryan Love
Macromedia Certified Professional
Internet Application Developer
Database Analyst
Telecomunication Systems
[EMAIL PROTECTED]
+-----------------------------------------------+
"...'If there must be trouble, let it be in my day, that my child may have
peace'..."
- Thomas Paine, The American Crisis
-----Original Message-----
From: Don Vawter [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 14, 2001 12:22 PM
To: CF-Talk
Subject: Dynamic query columns weirdness
The following works fine, qdata is a query, pad is a udf which returns
string padded with nonbreaking spaces. I put it on separate lines only for
readability here.
<option selected value="#vv#">
#pad(qdata[form.toplevel],35)#
#pad(qdata[form.midlevel],35)#
#pad(qdata[form.lowlevel],35)#
</option>
If I take out the pad function it fails, giving me a can't convert
qdata[form.toplevel] to a string.
I wonder why it can pass the value to a udf but can't evaluate it to output.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This list and all House of Fusion resources hosted by CFHosting.com. The place for
dependable ColdFusion Hosting.
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists