House of Fusion
Search over 2,500 ColdFusion resources here
  
Home of the ColdFusion Community

Mailing Lists
Home /  Groups /  ColdFusion Talk (CF-Talk)

UDF Problem

  << Previous Post |  RSS |  Sort Oldest First |  Sort Latest First |  Subscribe to this Group Next >> 
Can you show us how you are calling the UDF?
Raymond Camden
05/25/04 05:48 P
Try calling the function like this:
Ben Doom
05/25/04 05:50 P
Original Message:
Scott Brady
05/25/04 05:49 P
> Original Message:
Jim McAtee
05/25/04 06:05 P
Top  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Jim McAtee
05/25/2004 05:10 PM

Using CF5. I pull two float columns (prices) from a table and then pass the values to a CF function, shown below: function PriceRangeFormat(pricelo, pricehi) {   return DollarFormat(pricelo) & " - " & DollarFormat(pricehi); } I receive the following error, no matter the values passed: >> Parameter 1 of function DollarFormat must be a basic value, i.e., a >> string, number, logical, or date/time value But I can call DollarFormat() directly on the values without error.  It's only when I pass them into the CF function that I get the error.  All rows in this table contain numbers in the two fields, from 0.0 to maybe 2000.0. No null values. #DollarFormat(pricelo)# - #DollarFormat(pricehi)# What am I missing?

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Raymond Camden
05/25/2004 05:48 PM

Can you show us how you are calling the UDF?

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Ben Doom
05/25/2004 05:50 PM

Try calling the function like this: priceRangeFormat(pricelo[1], pricehi[1]); Just a guess, though. --Ben Doom Jim McAtee wrote: ----- Excess quoted text cut - see Original Post for more -----

Top  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Scott Brady
05/25/2004 05:49 PM

Original Message: > From: "Jim McAtee" > But I can call DollarFormat() directly on the values without error.  It's > only when I pass them into the CF function that I get the error.  All rows > in this table contain numbers in the two fields, from 0.0 to maybe 2000.0. > No null values. > > #DollarFormat(pricelo)# - #DollarFormat(pricehi)# Can you post the code that actually calls your UDF? Based on the error, it sounds like you're trying to pass a complex variable (array, recordset, structure, etc.) to the UDF instead of the simple values. Scott --------------------------- Scott Brady http://www.scottbrady.net/

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Jim McAtee
05/25/2004 06:05 PM

> Original Message: > > From: "Jim McAtee" > > But I can call DollarFormat() directly on the values without error. It's > > only when I pass them into the CF function that I get the error.  All rows > > in this table contain numbers in the two fields, from 0.0 to maybe 2000.0. ----- Excess quoted text cut - see Original Post for more ----- recordset, > structure, etc.) to the UDF instead of the simple values. Found it.  Sheesh.  'r' is the name of the query, so the function call itself wasn't crapping out. #PriceRangeFormat(r.PriceLo, r,PriceHi)# :-)


<< Previous Thread Today's Threads Next Thread >>

Search cf-talk

May 24, 2012

<<   <   Today   >   >>
Su Mo Tu We Th Fr Sa
     1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31     

Designer, Developer and mobile workflow conference