cancel
Showing results for 
Search instead for 
Did you mean: 

Multi-Mapping, only want to create target messages sometimes.

Former Member
0 Kudos

Hi,

I have a Multi-Mapping interface which maps a single incoming message to 3 target messages.

Based on the contents of the incoming message I only want to create a single instance of the outgoing messages.

The incoming message can have a repeating node of 3 types A, B or C. If there are multiple nodes of Type A then i need to create a single instance of one of the target messages and map the data in node A to this message, likewise for node B and node C.

I cant figure out how to do this. If I map a constant to the MT level of the target message and there are no type C nodes then the message type for this is created blank. But if I try and use the CreateIf tool then I get a MT created for each type C node.

Can anyone help with this?

If this isn't clear I will try to explain more.

Thanks

Accepted Solutions (0)

Answers (1)

Answers (1)

stefan_grube
Active Contributor
0 Kudos

... - equalS - createIf - (removecontexts) - collapseContexts - target

Former Member
0 Kudos

Hi,

Thanks for your answer, I tried what you suggested and while it is creating the MT for type A nodes correctly it is not creating the MT for type B or C nodes. I have tried messing with the context on the incoming field and not getting anywhere.

I always seem to get almost there with this mapping but never what I am looking for.

Gareth

RKothari
Contributor
0 Kudos

Have you tried to use IfWithoutElse inplace of CreatIf function ??

Pass the source field value in 'Then' as a result.

former_member200962
Active Contributor
0 Kudos
while it is creating the MT for type A nodes correctly it is not creating the MT for type B or C nodes.

same logic for B and C should help you....did you try the same mapping on B an C (as done for A)?

Former Member
0 Kudos

Yes I did use the same logic for B and C that I used for A and it still only created the MT for type A correctly.

I have also tried the IfWithoutElse and this doesn't have the expected results.

The only thing I can think of doing now is to write a UDF to create the MT for each node type once if it is required.