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
12 replies
Subscribers
7 subscribers
Views
8990 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
Integrations
Decimal field value greater than 9999999, Appian converts into Exponential forma
rajeshs
over 9 years ago
Decimal field value greater than 9999999, Appian converts into Exponential format automatically. When we pass this value to service, service is giving error stating it is expecting as decimal not scientific. Is there any possibility to avoid this automatic conversion to exponential format. Please note that we can not use fixed function because output of this function is Text type and not decimal. Please advise. Is it a service issue? Or can we do something at Appian end to avoid exponential format. Thanks.
OriginalPostID-209709
OriginalPostID-209709
Discussion posts and replies are publicly visible
0
Stefan Helzle
A Score Level 3
over 9 years ago
This is just a matter of display. When calling the service you can use the text() function to format the number. Try this: =text(99999999.0, "### ### ###.##")
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Stefan Helzle
A Score Level 3
over 9 years ago
BTW, searching for "exponential" gives you many discussions and solutions to your problem.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
bhanuprakashm
over 9 years ago
Hi Rajeshs,
Use this code for decimal val displaying more than 9999999
fixed(ri!decimalval,0,true) ..Its helpful to you.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
bhanuprakashm
over 9 years ago
in place of "0" you can place any integer value for number of digits after the decimal that will be maintained
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
rajeshs
over 9 years ago
Hi, Thanks for the reply. But, my issue is target service schema is of Decimal type. Even if we use fixed function, it's return type is text and while mapping to target field, it will again converted to exponential format. I don't need it for display purpose.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Stefan Helzle
A Score Level 3
over 9 years ago
So you are calling a web service ? What is the data type of the field? What method do you use to call it? Smart Service or expression? Please elaborate and add screen shots and/or code snippets.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
raghunandanj3904
Certified Senior Developer
over 9 years ago
Try passing the string value as is text() function output... As far as there are no alphabets, the service would take the value.. Else, make it a text field and handle the conversion at the service level which is called.. We have done similar to a date field, making it a string parameter as the date gets converted to GMT when we receive it in Appian..
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
bhanuprakashm
over 9 years ago
Hi Rajeshs,
As per my knowledge,if you are using decimal field for displaying values it displayed up to 9999999(7 integer values) values only more than that it will converts exponential symbols. Better to change the data type either integer (it displays up to 9 integer values or text(13 integer values) or provide the validation for users suppose if they are enter more than 7 values
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
rajeshs
over 9 years ago
Hi . We are using script Task where we are doing source to Target CDT mapping. Target PV is of Service CDT type and Source PV is of Appian CDT. I am attaching the screen shot for your reference.
ScreenShot.docx
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Stefan Helzle
A Score Level 3
over 9 years ago
Thanks for the info. Just to make one thing clear. The internal representation of a decimal in Appian always is the Java type double precision floating point. What you see is the conversion to a text representation which is different for smaller and larger numbers.
I try to explain what I see in my analysis.
In your screenshots the source field is of type text multiple. So when you have a decimal field in your form and save that to this text field, the value will already be converted to text and exponential form. Mapping this to a decimal field will not work for bigger numbers. See this test
=text(todecimal(tostring(9999999999.0)), "#.#")
So my suggestion is to change vehicle.odo to decimal type or use the text() function in the saveInto of the form field to make sure the textual representation of the decimal number is correct.
=text(todecimal(text(9999999999.0, "#")), "#")
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
>