cancel
Showing results for 
Search instead for 
Did you mean: 

Node functions to be used for creation based on conditions

former_member208581
Participant
0 Kudos

Hi guys,

At moment I'm struggeling a bit with the graphic mapping for my use case. Basically the issue is, that I do have a list of items, but some of these items have to be mapped to simple fields, if it appears. Here some examples from me:

Source structure as follow

<Source>

<ItemList>

<Item>

<PropertyA>

<Value1>AB</Value1>

</PropertyA>

</Item>

<ItemList>

</Source>

Target structure like this

<RFC module>

<ParamTableData>

<item>

<Key>AB</Key>

<Flag></Flag>

</item>

<ParamTableData>

</RFCmodule>

So if there is now another PropertyA type in the source structure with Value1 of 'XX', it should not be appear in the target structure. Furthermore this will be change <Flag> node to value 'X'.

Can anybody assist with the function to be used? I've already tried CreateIf but somehow it doesn't work as expected.

Regards,

Axel

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

It should work with createif.

But you must make sure the queue size for item, and key and flag.

It seems you should use if-else, make sure you fill in data in else branch, this way you make your queues size equal

Regards

Liang

former_member208581
Participant
0 Kudos

I will investigate the "createIf" proposal now. Let you know about the results.

Regards,

Axel

Answers (3)

Answers (3)

former_member208581
Participant
0 Kudos

By consulting a senior PI consultant we could figure out the solution for this issue.

Former Member
0 Kudos

Hi Axel,

Use can try with the standard node function like

1. IF

2.IFELSE

3.EXIST

4.CREATIF

Regards,

B.Jude

former_member200962
Active Contributor
0 Kudos
So if there is now another PropertyA type in the source structure with Value1 of 'XX', it should not be appear in the target 
structure. Furthermore this will be change <Flag> node to value 'X'.

You mean to say that only the first occurence of the PropertyA node should be considered? If yes then map PropertyA to the target node and do not raise the context.....this will ensure that only first occurence is considered.

To change the Flag node to X, check if PropertyA exists and has a value....if yes then assign X (constant) to Flag.

Regards,

Abhishek.