How to handle Double and Long values in Appian?

Hi,

How can we handle the Long and Double values in Appian, I tried saving 2147483647 as Integer in a constant but I got stopped with an error and when I try to convert it to integer (i.e., toInteger("2147483647")) am getting unreadable output.

So what is the best way to handle Long & Double values.

Regards,

Balaji.R

  Discussion posts and replies are publicly visible

Parents
  • Hi,
    I was also facing the same issue and to overcome with this we used a!textfield instead of a!intergerfield.
    but to restrict the user to enter only numeric values in the text field we created one more expression that removes alphabet and special characters from the value.
    ##ABC_Utils_RemoveAlphabetsAndSpecialCharacter
    concat(
    tointeger(
    apply(
    charat(
    ri!String,
    _
    ),
    enumerate(
    lenb(
    ri!String
    )
    ) + 1
    )
    )
    )
    Replace your integer field with this code
    _____________________________________________________________________________________________________
    a!textField(
    label: "Amount",
    value: rule!ABC_Utils_RemoveAlphabetsAndSpecialCharacter(
    String: ri!String
    ),
    saveInto: a!save(
    ri!String,
    rule!ABC_Utils_RemoveAlphabetsAndSpecialCharacter(
    String: save!value
    )
    )
    )
Reply
  • Hi,
    I was also facing the same issue and to overcome with this we used a!textfield instead of a!intergerfield.
    but to restrict the user to enter only numeric values in the text field we created one more expression that removes alphabet and special characters from the value.
    ##ABC_Utils_RemoveAlphabetsAndSpecialCharacter
    concat(
    tointeger(
    apply(
    charat(
    ri!String,
    _
    ),
    enumerate(
    lenb(
    ri!String
    )
    ) + 1
    )
    )
    )
    Replace your integer field with this code
    _____________________________________________________________________________________________________
    a!textField(
    label: "Amount",
    value: rule!ABC_Utils_RemoveAlphabetsAndSpecialCharacter(
    String: ri!String
    ),
    saveInto: a!save(
    ri!String,
    rule!ABC_Utils_RemoveAlphabetsAndSpecialCharacter(
    String: save!value
    )
    )
    )
Children
No Data