Skip to Content
0

XSDS: Add field condition

Feb 13, 2017 at 12:36 PM

44

avatar image

Hello Friends

I am using XSJS XSDS services, to retreive data from SAP HANA tables. I had a requirement of calculating a sum of a column. All works fine, when I create new fields, with calculation logic, in the .$addFields clause. But the response is coming as a string. Even though the column data is decimal.

I tried with options to parse the values to Int. but none worked. Did any one face this issue before? and could find a solution/work around?

thanks for your responses

Regards/Giri

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Sergio Guerrero Feb 13, 2017 at 03:20 PM
-1

make sure your columns are coming back to the xs layer as decimals.

make sure that your aggregation is still as decimal... and make sure you are not parsing to string. if you see decimal at all steps and before the output.. most likely you have some toString() function applied in your JavaScript.

Share
10 |10000 characters needed characters left characters exceeded