Skip to Content

Nested if else is possible in HCI DS?

Hi All,

Is it possible to use Nested if else in HCI DS?

Scenario:

I will be getting 10 vendor from Source system, in which, data mapping should be done for 3 vendors, e.x. Vendor 01,02,03,...10 01->A, 02->B, 03->C, rest should be sent as same i.e 04->04...10->10.

Regards,

Mani

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Sep 20, 2017 at 07:49 PM

    Hi Mani,

    Yes, you can use nested ifthenelse function in CPI-DS.

    I created a task and use the Row Generation to create an example

    The full code is below:

    ifthenelse((Row_Generation1.DI_ROW_ID>=1 and Row_Generation1.DI_ROW_ID<=3),'Get value for ROW_ID Between 1 and 3',ifthenelse((Row_Generation1.DI_ROW_ID>=4 and Row_Generation1.DI_ROW_ID<=10),'Get value for ROW_ID Between 4 and 10','otherwise value'))

    And the result was:

    Best regards,

    Edson Thomaz

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 22, 2017 at 09:35 PM

    Hi,

    there is a DECODE function which is similar to nested ifthenelse. it looks better to look at the code.

    Thanks!!

    Add comment
    10|10000 characters needed characters exceeded