21 digits number

Hello All 

I want to add a field that accept only 21 digits of number I tried to use a!integerField but is not allowed to enter too long numbers 

  Discussion posts and replies are publicly visible

Parents
  • The largest value integer can store on Appian is 2147483646 and after that, it takes it back to negative. 

    Because you want to store 21 digits, you can use textField with length validation and another validation that makes sure the user is only entering numbers. 

    a!textField(
      characterLimit: 21,
      value: ri!value,
      saveInto: ri!value,
      validations: if(
        a!isNullOrEmpty(stripwith(ri!value,"1234567890")),
        {},
        "Value can only contain numbers"
      )
    )
      

    NOTE - You will also need to change the Datatype of your CDT field, Record field, and DB column to text. 

Reply
  • The largest value integer can store on Appian is 2147483646 and after that, it takes it back to negative. 

    Because you want to store 21 digits, you can use textField with length validation and another validation that makes sure the user is only entering numbers. 

    a!textField(
      characterLimit: 21,
      value: ri!value,
      saveInto: ri!value,
      validations: if(
        a!isNullOrEmpty(stripwith(ri!value,"1234567890")),
        {},
        "Value can only contain numbers"
      )
    )
      

    NOTE - You will also need to change the Datatype of your CDT field, Record field, and DB column to text. 

Children