cancel
Showing results for 
Search instead for 
Did you mean: 

IF condition in PI message mapping

fisher_li
Participant
0 Kudos

I have problem to get my "if condition" works in the PI message mapping.

The scenerio is that a segment can occurs many times.

In this segment, there are two fields "@type" and "IsoCountryCode" at the same level.

The values can be:

<@Type>physical</address type>

<IsoCountryCode>US</IsoCountryCode>

<@Type>remitto</address type>

<IsoCountryCode>US</IsoCountryCode>

<@Type>fulfillment</address type>

<IsoCountryCode>US</IsoCountryCode>

I tried to achieve the following simple logic but I just can not make it work.

  If @type = "fulfillment" and IsoCountryCode = "US" then set the KTOKK = 'Z001' in the target.

  All other conditions, set the KTOKK = 'Z007' in the target.

I tried to use the "And" and 'If"  but I just can not make it work, either.

Thanks in advance!

Fisher

Accepted Solutions (1)

Accepted Solutions (1)

former_member190293
Active Contributor
0 Kudos

Hi Fisher Li!

If you want to have result line for any of your Address item:

If you want to have just one result line:

Regards, Evgeniy.

fisher_li
Participant
0 Kudos

Evgeniy,

     Thank you very much! I tried your way and it worked!

Fisher

Answers (1)

Answers (1)

Harish
Active Contributor
0 Kudos

Hi Fisher,

In your second screenshot, output queue is perfect. Please add split by value after the if output and test. This should work, because occurrence of output field is 0.1.

regards,

Harish