Skip navigation
Currently Being Moderated

Numeric field changes to 2147483647 automatically

Mar 7, 2012 11:55 PM

Tags: #livecycle_designer

Hi

 

I have a numeric field in the form which is not taking any value more than 9 digits. If we try to enter more than 9 digits, It automatically changes to

'2147483647' number.

 

Can anyone the reason pls and also the solution.

 

Thanks In advance

 

Abhiram

 
Replies
  • Currently Being Moderated
    Mar 8, 2012 12:57 AM   in reply to Abhiram88

    Hi Abhiram,

     

    What validation pattern have you set for the field?

     

    Thanks,

    Bibhu.

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 8, 2012 2:20 AM   in reply to Abhiram88

    Hi Abhiram,

     

    This is the maximum for a numeric field, anything above this value will be truncated (this is 2^31 -1).  You may want the following JavaScript in the change event of the field.

     

     

    var newValue = parseInt(xfa.event.newText, 10);

    if (isNaN(newValue) || newValue < -2147483648 || newValue > 2147483647)

    {

        xfa.event.change = "";

    }

     

    If you need larger values your will need use a text field.

     

    Bruce

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points