Querying Database With Large Decimal

Im having an issue where if I have a large decimal that I am using in my queryFilter to query the database with, the query crashes.

a!queryFilter(
field: "minDevCost",
operator: "<=",
value: ri!devCost
),
a!queryFilter(
field: "maxDevCost",
operator: ">=",
value: ri!devCost
)

The CDT field is a numeric (Decimal).

If I enter in a decimal of 9000000000, the query crashes.
if I enter in a decimal of 9000000000.00, then the query processes fine.

However, I cannot force the number to have 2 decimal places as if I use the text function
text(9000000000, "###############.##")
I get back N/A

I tried the fixed function as well and this did not work.

Any other suggestions to get this to work?

OriginalPostID-257369

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer
    @benjamin it's the issue of range of number, as Appian build on top of Java, hence as per Java, the range of number is between -2,147,483,648 to 2,147,483,647,
    So as per this, I think the value which you are passing, is exceeding the range and hence you are facing issue

    Try entering the max range value as input as mentioned above I.e. 2,147,483,647, and check whether it's working or not. Even the value entered by you just exceeding a bit as we the range of int, try passing the max range value, and let us know if still facing the same issue
Reply
  • 0
    Certified Lead Developer
    @benjamin it's the issue of range of number, as Appian build on top of Java, hence as per Java, the range of number is between -2,147,483,648 to 2,147,483,647,
    So as per this, I think the value which you are passing, is exceeding the range and hence you are facing issue

    Try entering the max range value as input as mentioned above I.e. 2,147,483,647, and check whether it's working or not. Even the value entered by you just exceeding a bit as we the range of int, try passing the max range value, and let us know if still facing the same issue
Children