• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Error invoking CFC: the argument passed to the function is not of type numeric.

New Here ,
Oct 18, 2010 Oct 18, 2010

Copy link to clipboard

Copied

Hello all:

This cfselect bind works great:

<cfselect name="frm3" id="frm3" bind="cfc:testRequests.get_Rates({frm2})" bindonload="false" value="rate" display="rate" />

The get_Rates function takes one numeric argument, and the bind works properly.

If I update the get_Rates function to take a 2nd numeric argument, and then try this:

<cfselect name="frm3" id="frm3" bind="cfc:testRequests.get_Rates({frm2},{frm1})" bindonload="false" value="rate" display="rate" />

I get the error: "Error invoking CFC: the argument ID passed to the function get_Rates is not of type numeric"

Argument frm1 IS numeric, because I'm using it elsewhere and that bind work properly.

But now, the frm2 param looks like it is being read as an empty string, but when it was the only argument, it worked fine.

The strange thing is, the select box *does* update properly, after I click ok to get past the error.

Can anyone shed some light on what's happening?

Thank you kindly!

Doug

TOPICS
Advanced techniques

Views

2.0K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 19, 2010 Oct 19, 2010

Copy link to clipboard

Copied

Without seeing the rest of the form its hard to know.It sounds like the binding elements are firing off a little too quickly.  One thing you could do is remove the argument type on the function in the cfc and then if both arguments are not numeric (use the isNumeric function) return a blank query (made using queryNew() ) so that the page does not break.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 19, 2010 Oct 19, 2010

Copy link to clipboard

Copied

Thank you for the reply, Sam.

I did test changing the argument type to try and see what is being passed in... when only one argument is present, type numeric, everything works perfectly.

When I add a second numeric argument, I get an error that the first argument is not numeric.

If I change the argument type to a string to see what it's doing, I get an error about string invalid data ' '.

I'm still trying to debug it, but it has me stumped so far.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 19, 2010 Oct 19, 2010

Copy link to clipboard

Copied

Oddly enough, and even though both arguments are numeric, I changed the arguments to strings,

and everything started working properly.

Why? Have no idea. But at least the binds are working properly now!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 19, 2010 Oct 19, 2010

Copy link to clipboard

Copied

LATEST

Cool.  Embrace the beauty of a typeless language!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation