cancel
Showing results for 
Search instead for 
Did you mean: 

Nested if else is possible in HCI DS?

manikandan_shanmugam3
Active Participant
0 Kudos

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

Accepted Solutions (0)

Answers (2)

Answers (2)

0 Kudos

Hi,

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

Thanks!!

i827647
Product and Topic Expert
Product and Topic Expert
0 Kudos

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