Appian Converting the decimal value to a nearest integer

HI All,

I'm using Appian Integrations to call one of the API's. I have set the response Body parsing to "Convert JSON To Appian Value" instead of the default "Return raw response body".

So when I tried to call an API with the above set configuration, 

The result returned by the API call is being converted to an integer number.

Example :  If i set my response body to "Convert JSON to Appian Value", 

the expected result should be totalAmount: 42103.95 but it is displayed as 42104. 

Is this how it works? Does configuring response body parsing to "Convert JSON to Appian Value" rounds the decimal value to nearest integer?

  Discussion posts and replies are publicly visible

Parents
  • That's odd. Normally the decimal value should stay the same. I have just run a test by using a!fromJson(a!toJson({number:42103.95})) and it worked fine.

    Are you casting it to a CDT using cast()? If so, if an integer data type has the corresponding keyword it will remove the decimal value to convert it into an integer - for example tointeger(42103.95) returns 42103.95

    If not, could you either copy and paste your SAIL or upload a screenshot?

Reply
  • That's odd. Normally the decimal value should stay the same. I have just run a test by using a!fromJson(a!toJson({number:42103.95})) and it worked fine.

    Are you casting it to a CDT using cast()? If so, if an integer data type has the corresponding keyword it will remove the decimal value to convert it into an integer - for example tointeger(42103.95) returns 42103.95

    If not, could you either copy and paste your SAIL or upload a screenshot?

Children