Skip to main content
Legend
January 26, 2009
Question

Right() Problem?

  • January 26, 2009
  • 2 replies
  • 326 views
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.
    This topic has been closed for replies.

    2 replies

    Legend
    January 26, 2009
    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).
    Inspiring
    January 26, 2009
    if qCardInfo is a query, specify the row number.