Skip to Content
avatar image
Former Member

Mapping logic in PI 7.1

Hi experts,

I need your advice on the mapping. I have header and details in the records of a strucure.

header occurs once and details is unbounded.

i have a counter assigned to one of the field in the target structure which should get incremented only incase of multiple detail records of the records.

if the record has one header and one detail- then the counter shouldnt increment.

if the record has one header with multiple records- the counter should increase to next level.

the record is the parent node which occurs unbounded times.

Record

Header--1.1

Details 1..unbounded.

How can i achieve this in mapping. please advise.

thanks

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Apr 06, 2017 at 08:02 AM

    You can make use of index function. If you want the mapping logic, please share us the expected output here.

    Add comment
    10|10000 characters needed characters exceeded

  • Apr 06, 2017 at 10:56 AM

    Hi Smith!

    Use "Count" and "Sum" standard mapping functions:

    If count(details) > 1 then 1 else 0 -> removecontexts() -> sum() -> result.

    Regards, Evgeniy.

    Add comment
    10|10000 characters needed characters exceeded