But that seems inconsistent with what happens.

The udf is simply

function pad(st,stle){
 if(len(st) GE stle) return left(st,stle);
  st=st & repeatstring(" ",stle-len(st));
 return st;
}

If st were a pointer to an array wouldnt the udf choke?
In fact the udf functions as designed, it takes the column value and pads is
appropriaately


----- Original Message -----
From: "Bryan Love" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Friday, December 14, 2001 2:48 PM
Subject: RE: Dynamic query columns weirdness


> 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.
>
>
>
> 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm
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

Reply via email to