cancel
Showing results for 
Search instead for 
Did you mean: 

Splitting within contexts

Former Member
0 Kudos

Hi,

I have a scenanio where there are multipe occurances for a tax code within an item feed. The incoming message would look like:

<Item>

Context1:

Tax1

Tax2

Context 2

Tax3

Context 3

Tax4

</Item>

and the output would look like

<Item>

<Tax>

<Tax1>

</Tax>

<Tax>

<Tax2>

</Tax>

<Item>

<Item>

<Tax>

<Tax3>

<Tax>

<Item>

<Tax>

<Tax4>

<Tax>

So I have Tax1 and Tax2 in the same context of the input but in the output they need to be split as shown in the example across. Any ideas ..

Teresa

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

You can use remove context function(Removes all immediate level contexts of a source field. In this way, you can delete all hierarchy levels and generate a list) and now use Splitbyvalue(each value) function(by applying splitbyvalue the field tax will split into different context from the same context).

Source fields>Remove context>Splitbyvalue-->Desired Output

I hope this helps you to get the desired output.

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

Bring the source fileds under one context either change the context of source field or use remove context and then use splitbyValue (for each value). this should get you the required results.

Regards,

Pragati

stefan_grube
Active Contributor
0 Kudos

node function SplitByValue ?

Former Member
0 Kudos

Hi,

Is there any field in the source for each Conext will repeat the same field.

you should have common field for each context so that you can take that field then repear the target items that many number of times.

hope this logic will help you.

Regards,

Venu.