AnsweredAssumed Answered

How to loop through child elements, pickup the latest date and cascade it up to Parent level?? Flat File Structure with a Parent and Child each having 5 elements

Question asked by shashikant.choubey037786 on Oct 18, 2017
Latest reply on Oct 18, 2017 by shashikant.choubey037786

Hi All,

 

I have a requirement where I have a flat file to flat file mapping. Both my source and target profile has 2 levels (logically), a Parent and a child(ParentID-prefix). The source data looks something like this:

 

12345,Yes,,,
12345-01,Yes,,,11/10/2017
12345-02,No,,,17/10/2017
12345-06,No,,,20/10/2017
12345-09,Yes,,,01/08/2017
12345-05,Yes,,,03/10/2017
12345-00,Yes,,,18/10/2017
12345-07,No,,,11/10/2017
12345-04,No,,,12/10/2017
12345-08,Yes,,,05/10/2017
67890,No,,,
67890-09,No,,,13/07/2017
67890-00,Yes,,,29/06/2017
67890-03,Yes,,,01/07/2017
67890-06,Yes,,,06/08/2017
67890-03,No,,,25/07/2017
67890-01,Yes,,,27/07/2017
67890-04,No,,,
34789,Yes/No,,,
34789-05,Yes,,,11/09/2017
34789-02,No,,,07/04/2017
34789-09,No,,,23/05/2017
34789-00,No,,,18/02/2017
34789-07,Yes,,,30/08/2017
34789-01,No,,,27/06/2017

 

I have to now pick up the latest date from the child elements and populate that at the Parent level and hence the output should now look something like:

 

12345,Yes,,,20/10/2017
12345-01,Yes,,,11/10/2017
12345-02,No,,,17/10/2017
12345-06,No,,,20/10/2017
12345-09,Yes,,,01/08/2017
12345-05,Yes,,,03/09/2017
12345-00,Yes,,,18/10/2017
12345-07,No,,,11/10/2017
12345-04,No,,,12/09/2017
12345-08,Yes,,,05/10/2017
67890,No,,,06/08/2017
67890-09,No,,,13/07/2017
67890-00,Yes,,,29/06/2017
67890-03,Yes,,,01/07/2017
67890-06,Yes,,,06/08/2017
67890-03,No,,,25/07/2017
67890-01,Yes,,,27/07/2017
67890-04,No,,,11/09/2017
34789,Yes/No,,,11/09/2017
34789-05,Yes,,,11/09/2017
34789-02,No,,,07/04/2017
34789-09,No,,,23/05/2017
34789-00,No,,,18/02/2017
34789-07,Yes,,,30/08/2017
34789-01,No,,,27/06/2017

 

Given that we don't have any in-built sorting shape in Boomi yet, it would be good to have some insight on this, if any of you have done similar sort of logic.

 

Thank you very much in advance..!!

Outcomes