Skip to Content
0

Need help with mapping

Jul 18, 2017 at 01:35 PM

70

avatar image

Hi Gurus,

I am struggling with mapping. Please help me out.

My Input xml looks like below

eg1:

eg2:

In last ArticleInformation node, we will receive all ConditionItems.

In output, ArticleInformation we map to E1WPB02 and ConditionItem to E1WPB03

My requirement is If LineNumber of ArticleInformation == LineNo of ConditionItem, move conditionItem(E1WPB03) node under to corresponsing ArticleInformation (E1WPB01). Just like below. (note: I just used split by value here). But some times, we are having more than one Condition item for same article and splitbyvalue is not working in that case.

Thanks

capture.jpg (53.6 kB)
capture1.jpg (74.7 kB)
capture2.jpg (60.6 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Best Answer
Raghuraman S Jul 18, 2017 at 01:45 PM
0

Can you try sort function followed by split by value(value change)?

Share
10 |10000 characters needed characters left characters exceeded
Ryan Crosby Jul 19, 2017 at 11:45 PM
1

Hi Tapasya,

I think along the same lines of what Raghuraman has already mentioned but with a slight modification -

sort by line -> split by value (change) -> collapsecontext -> split by each value

Taking that approach should ensure that only one entry is created for each line item even when multiple conditions exist for an item.

Regards,

Ryan Crosby

Share
10 |10000 characters needed characters left characters exceeded
Tanuja Surapaneni Jul 18, 2017 at 01:54 PM
0

Thanks Raghuram for quick response. Some times, we are missing conditionItem, only we are getting ArticleInformation. SplitbyValueChange won't work in that case

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Incase of no condition Item means no value should be passed right?

I think using sort before should help.

Requirement is little unclear, each condition item should generate E1WPB03 and each article should generate E1WPB02 right?

0