Integer field has a maximum limit of 10 digits?

Collapse
X
 
  • Time
  • Show
Clear All
new posts

  • yuri
    replied
    If you set min value to 0, it won't accept negative values, meaning only 0-9 digits will be valid.

    Leave a comment:


  • victor
    replied
    mansi.kakkar,

    In Administration > Entity Manager > Your_entity_name > Formula > Before Save Custom Script put:
    HTML Code:
    cForumVarch = string\match(cForumVarch, '/^[0-9]*$/');
    Replace cForumVarch​ with the name of your Varchar field.​​

    If a value other than 0-9 is put in cForumVarch, it will return null.

    Leave a comment:


  • mansi.kakkar
    replied
    victor Ok, I think its much easier with a varchar field. How can I ensure that this field only accepts 0-9 digits, nothing else?

    Leave a comment:


  • victor
    replied
    In your particular case, it is better to use a different field type (for example, Varchar) or you can try the following:

    1. In your_instance_name/custom/Espo/Custom/Resources/metadata/entityDefs/Your_entity.json find your field​ and under the line
    Code:
    "type": "int",
    add
    Code:
    "dbType": "bigint",
    You should end up with something similar to:

    Click image for larger version

Name:	image.png
Views:	626
Size:	33.4 KB
ID:	106930
    2. After saving the changes in the file, make Rebuild via CLI: https://docs.espocrm.com/administrat...mands/#rebuild.

    After these changes, I was able to put "9999999999999".​

    Leave a comment:


  • Integer field has a maximum limit of 10 digits?

    I created a new integer field and want to store 12 digits in it. Apparently, it gives me an error if I try to add more than 10 digit number. Can we increase it?
    Also, I haven't set any limit on the field.
    Click image for larger version

Name:	image.png
Views:	649
Size:	7.1 KB
ID:	106919
Working...