Skip to Content

XSDS prefixOp TO_INT

Hello Friends

I am using XSDS to retrieve records from a CDS table. In this CDS table, there is a column which is defined as a VARCHAR. But the actual content is number/integer.

How can I type cast this column, when putting a filter on this table, from XSDS/XSJS.

I am using the below code, but it is not working as expected.

allCs.$and(details.Maxdt.$prefixOp("TO_INT").$ge(parseInt(input.maxDate,10)));

Could any one suggest, if I am missing something here? or I should have followed a different approach to test this

Regards/Giri

Add comment
10|10000 characters needed characters exceeded

  • Maybe you can describe what did not meet your expecation?

    I tested the coding with an own example with success. The data is converted to INT and successfully filtered agains the passed GE value.

    Regards,
    Florian

  • Follow
  • Get RSS Feed

0 Answers