Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Not Answered
Replies
4 replies
Subscribers
9 subscribers
Views
2434 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
General
We found a bug when using Text() function. My purpose is to show a in
alvinc
over 10 years ago
We found a bug when using Text() function.
My purpose is to show a inputted value in predefined format, by using Text() function. the output is fine except some scenario.
For example, if the input value is 25000.01, expected result should be $25000.01
but the actual result is $25000.00.
Please advise.
OriginalPostID-148994
OriginalPostID-148994
Discussion posts and replies are publicly visible
0
best
Certified Lead Developer
over 10 years ago
You can use the following function.
dollar(25000.01,2)
It will give you the desired output.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
alvinc
over 10 years ago
Thanks for your suggestion. This is a solution we are going to apply.
But is it an appian bug?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Amitkumar
over 10 years ago
I would rely on fixed function for rounding the number to certain number of decimal places and add commas to numeric values if required. It gives me correct result always. Text function works perfectly fine if you have correct format in place. Format may or may not work for some scenarios such as the one you mentioned.
For instance, this expression gives me exact $16,383.30.
dollar(
fixed(16383.3,2,false()) /**Round upto 2 decimal places and show commas*/
)
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
jakeg
over 10 years ago
Be aware that if you start going into very large numbers or very small numbers the values may be converted to scientific notation by Appian depending on which functions you're using.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel