Skip to Content

XSDS: Add field condition

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


Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Feb 13, 2017 at 03:20 PM

    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.

    Add comment
    10|10000 characters needed characters exceeded