How to remove float formatting

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Nishan Perera
    Active Community Member
    • Jan 2019
    • 348

    How to remove float formatting

    Hi,

    I wanted to enter some long number with float, but i'm getting this "3,569,701,037,983,701". This can be done with int field type, but it doesn't allow for long number range.

    Any help.
    Cheers!
    Nishan.
  • esforim
    Active Community Member
    • Jan 2020
    • 2204

    #2
    I believe there is a limitation on all numbers type of field on the maximum. I guess in float case it is that trillions (?) numbers you posted.

    I don't think it is possible, I'm guessing due to database restriction. You just have to use some other field type if you want to use that sort of number range.

    There is no field validation option in EspoCRM so you have to code one if you want to restrict the field to only allow for numbers.

    See this thread that I previously found out about numbers limitation
    Version: 5.8.4 Recently tried to create a length of approximately 11 padding length Number (auto-increment) and notice that there is a limitation on this. I believe it roughly 2,165,000,000? I assume that this number cannot be increase due to some limitation of SQL? There should be a warning or a Error Message saying the

    Comment


    • Nishan Perera
      Nishan Perera commented
      Editing a comment
      In float I can use that number range. Now i wanted to remove the formatting only.
  • esforim
    Active Community Member
    • Jan 2020
    • 2204

    #3
    Ah I see what you mean, my bad.

    I had a quick check and it seem that "Int" field have the option to "Disable Formatting", but Float does not. I guess at this stage you just only you would need to do some copy/paste of coding from the Integer field to the Float field.

    Or you could create a new field call, "Float-2" or something maybe. I check the coding and it seem relatively easy to find reference of the Formatting code, however to make it work and if there is any other file you need to edit I'm not sure.

    EspoCRM – Open Source CRM Application. Contribute to espocrm/espocrm development by creating an account on GitHub.

    EspoCRM – Open Source CRM Application. Contribute to espocrm/espocrm development by creating an account on GitHub.

    Searching for "format" in the "int.js" may give you clues.

    Searching for "float" give quite a few files, Int get mixed with Integration so it harder to find files.

    Comment

    Working...