Hi,
we use a query entity to retrieve decimal numbers to check data inserted.
After testing, we see that Appian have a strange behaviour with decimal digits, according to the integer digits of the number.
For example, when we insert a number with 5 integer digits, it shows 2 decimal digit, while, when we insert a number of 6 integer digits, it shows 1 decimal digit. With 7 (or more) integer digits, no decimal digits are visible.
This is not a DB problem, because, if I use an expression rule, with a conversion on decimal number, I get the same problem.
Here some examples:
I try also "fixed" function, but sometimes it doesn't works.
Is there a workaournd to get the right value?
Thanks.
Regards.
Juri Monti
Discussion posts and replies are publicly visible
Hi there,
As far as I can understand the pattern, looks like the total digits (including before and after the decimal) cannot exceed 7 numbers. I think fixed() is the only option here but you mentioned that it is also not giving you the correct result. Can you add some supporting screenshots?
Hi Harshit,.
thanks for your response.
we have on DB the value 721937,22. When we try to recall it on Appian and we use the fixed (or text) function, we have the following result:
The value on DB is getting from a view that did a sum from a table (aggregating data).
Regards,
You can use text function to fix this issue. text("12334.22334","#####.#####")
with text function, I get the same problem in the previous message.
What output you are expecting? what is your input?
my inputs are 3 fields to pass to the query entity to retrieve the number decimal.
As result I expected 721937.22 , but system gives me 721937.2 . If I use text or fixed function, I get 721937.25 .
I don't see a problem with the fixed() function except that it will add extra 0s in the end to match the length.
It is working for me.
AFAIK, the values are not being changed at all; instead what you're seeing is Appian deciding what significant digits to show on the front-end when rendering the text to show us. Like how you can output the value of "now()" in an expression rule and it doesn't display seconds and milliseconds, but they're still there in the data if you "dig" correctly.
So I'm not really sure how to answer your question since I'm not sure what you're actually trying to do, but I suspect so far you're approaching it with incorrect assumptions - and if you remedy that, you might just find your own solution I suppose.