Skip to Content
0

Grouping 2 records based on the common field value in those Records.

Mar 16, 2017 at 10:06 AM

61

avatar image

Hello PI experts,

i need a help in the below mentioned scenario.

grouping-mm.jpg

i need to group 2 records REC10 and REC20 based on one common field value.

there is one common filed NUMREGD if the value in both the records are equal than i need to make it in 1 set. i have achieved it.

please note i have achieved it when the file is coming in the below format.

REC10

REC20

REC10

REC20.. so onn

like 1st record is REC10 2nd record REC20 REC10 REC20...so onn

i am facing the issue when the file is like

REC10

REC20

REC10

REC10

REC20

in the above case the grouping is happening not in proper way like

in the above highlighted REC10 , the corresponding REC20 is missing, in that case it is taking the next REC20 and grouping them.

now my requirement is if REC20 does not present than we need to group only 1 REC10.

like

1st group

REC10

REC20

2nd group

REC10

3rd group

REC10

REC20.

can some one help me on this?

thanks a lot in advance.

Best regards

Prudhvi.test-result.jpg

grouping-mm.jpg (67.8 kB)
test-result.jpg (72.0 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Baskaran Elumalai Mar 21, 2017 at 09:01 AM
0

Hi Prudhvi,

Can you please provide the complete structure of source, so that we may provide you a solution.

Also let us know if the common field NUMREGD value is same for the consecutive set of Records REC10, REC20 or is it occurring in random?

(Attach a sample source XML)

Share
10 |10000 characters needed characters left characters exceeded