cancel
Showing results for 
Search instead for 
Did you mean: 

mapping requirement.

Former Member
0 Kudos

Hi Folks,

Here i am facing a problem regarding the mapping in XI. i just like to know whether my requirement is possible in message mapping or not.

my requirement is -


i am having 5 fields under one node on the sender side and 5 fields under one node on other receiver.

its a simple one to one mapping.

the specific condition is that i need to create an element on the receiver side when it is getting some value from the sender side... else the receiver element is not to be created.

even i tried with the mapping as

Sender--->exists--->createif--


> receiver.

but it is not passing the value to the receiver element.

the condition is based on the value......

if we get the value to an element on the sender side then that particuler element on the receiver side need to be created . else dont wnat to create the element at all on the receiver side .

please help me ......

Regards,

Sridhar Dasari.

Accepted Solutions (1)

Accepted Solutions (1)

justin_santhanam
Active Contributor
0 Kudos

Sridhar,

If you could give the source and target strcuture and the condition, it could be easy for us to suggest.

raj

Former Member
0 Kudos

Hi Raj,

Thanks to have a look on my thread.

the sender structure is

--> Sender

Fld1

Fld2

Fld3

Fld4

the receiver structure is

-->Receiver

feild5

feild6

feild7

feild8

Now coming to my condition

if the elements (Fld1,Fld2,Fld3,Fld4) in the sender structure gets some value from the sender then only the respective elements (feild5,feild6,feild7,feild8) need to be created. else not to create the element at all.

for example if i am passing some value to Fld1,Fld2 and Fld3 and not passing any value to Fld4. then on the receiver side we need to create the elements feild5,feild6,feild7. we dont have to create the element "feild8".

we need to create the elements and we have to pass the values also coming from the perticular input elements. please help me.

justin_santhanam
Active Contributor
0 Kudos

Sridhar,

I believe it's pretty simple. Just map directly Field1 to Field 5, Field2 to Field6, Field3 to Field7, Field4 to Field8.

The only thing u need to do is, make the target elements Field5, Field6, Field7, Field8 occurrences as 0..1

This would help u to achieve the logic, am I right?

raj.

Former Member
0 Kudos

Hi,

Use the below logic.

input fields f1,f2,f3,f4 & constant with value "null" dont put any values in constant function -> equals-> not->createif->target.

this will repeat for all input fields.

Chirag

Former Member
0 Kudos

Hi Raj,

i tried the procedure you suggested. but still it is creating a node for the blank values on the receiver side. i dont want to send any blank value to the receiver.please look into this.

Former Member
0 Kudos

Hi chirag,

i tried your procedure tooooooo.... but its giving the runtime exception while testing. no matter if i give a value to the input or if i dont provide any input. it is giving the runtime exception. please have a look into this.

justin_santhanam
Active Contributor
0 Kudos

Sridhar,

Not exist is entirely different from the field if has blank values.

Let the occurrences be 0..1, and follow the same logic as provided by Chirag. It shouldn't be null, rather it must be empty constant -ie Constant function with no values in it.

raj.

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi folks,

First of all Thank you very much for all your quick responses. i got solved this problem on my own working with my colleague. In future also i like to work with all of you folks.

Here i am giving the procedure that worked out for my requirement.

Sender->"Length"--> to the upper lobe of the "Greater" and the lower lobe of "greater" is mapped to "constant(0)" .

This "greater" is mapped to the "IF" lobe of the "IF with out Else"

and the sender element is again mapped to "Then" lobe of the "IF with out Else". final output of the "IF with out Else" is mapped to the result node. try this out.

Thanks For all of you ........ SARVESH...RAJ....CHIRAG.....SUNIL...

Thanks for your patience and support.

sunil_singh13
Active Contributor
0 Kudos

Use Function node CollapsContext now if value does not come it will show [] .

now put if without else (from boolean) if i/p equals [] and then put Not and KeepS = true (it is a property in if without else .just double click on if without else u will see that ) Now u can do the same for other fields also . Now to Consolidate :-

Fld1 ->CollapsContext ->equals-> [] ->Not ->IfWithoutElse(Keeps = true)->out

u canget [] from constant .If Did not get this please revert back .

Reward points if helpful;

Regards ,

Sunil Singh

Former Member
0 Kudos

Hi,

Can u pls let me know the exception u r getting.

Have u used thee exact process which i have given u.

use blank value in constant function.

Chirag.

Former Member
0 Kudos

Yes it is possible according to your question.

Do like this.

use, Equals, constant, NOT, If without else in your mapping

Sender ---> If not equals (empty cosntant or specific value with u what) ---> then map ---> sender -


> Target

Regards,

Sarvesh