Skip to Content
avatar image
Former Member

Need help with mapping

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)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    Jul 18, 2017 at 01:45 PM

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

    Add comment
    10|10000 characters needed characters exceeded

  • Jul 19, 2017 at 11:45 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jul 18, 2017 at 01:54 PM

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

    Add comment
    10|10000 characters needed 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?