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

Right() Problem?

Advocate ,
Jan 26, 2009 Jan 26, 2009
Ok, I've worked with CF for many, many years now and this one is a first for me. My exception handler trapped the following:

quote:

An error occurred while evaluating the expression:

#Right(qCardInfo.CardNumber,4)#

Error near line 68, column 32.
--------------------------------------------------------------------------------

Parameter 2 of function Right which is now "4" must be an integer

The error occurred while processing an element with a general identifier of (#Right(qCardInfo.CardNumber,4)#), occupying document position (68:31) to (68:61) in the template file xyz.cfm.

I know I'm getting old and I'm not up on the "new math" but I believe "4" is still an integer.

This was CF5. I use logic like this all over so I'm writing this one off as a one time freak event but this resolution does not give me the warm fuzzies. If anyone has any ideas, I would like to hear them.
311
Translate
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
LEGEND ,
Jan 26, 2009 Jan 26, 2009
if qCardInfo is a query, specify the row number.
Translate
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
Advocate ,
Jan 26, 2009 Jan 26, 2009
LATEST
It is a query but I've never had to do that before (unless, of course, I wanted to reference a row other than the current row, 1 in this case).
Translate
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