Skip to Content
0

Mapping logic in PI 7.1

Apr 04, 2017 at 07:47 AM

54

avatar image
Former Member

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

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Muniyappan Marasamy Apr 06, 2017 at 08:02 AM
0

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

Share
10 |10000 characters needed characters left characters exceeded
Evgeniy Kolmakov Apr 06, 2017 at 10:56 AM
0

Hi Smith!

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

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

Regards, Evgeniy.

Share
10 |10000 characters needed characters left characters exceeded