cancel
Showing results for 
Search instead for 
Did you mean: 

Simple Message Mapping probelm

Former Member
0 Kudos

Hi All,

I am running in a mapping issue:

E1KVVM

--ELKNVPM

-


Field1

-


Field2

-


Field3

This segment is a multiple occurance segment..

I am getting valuse in payload as

E1KVVM

--ELKNVPM

-


Field1-----A

-


Field2-----1

-


Field3-----123

E1KVVM

--ELKNVPM

-


Field1-----B

-


Field2-----2

-


Field3-----456

E1KVVM

--ELKNVPM

-


Field1-----C

-


Field2-----3

-


Field3-----789

I need to Pass Field3 data to the target field where the Field2 value is 3 if not found I should send null value

How could I achieve this?

Thanks

Rajeev

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos
Field2--------
               equalsS-----------
constant 3-----                   IfWithoutElse----TargetField
               Map Field3---------

Compare Field2 input field to Constant 3 using "equalS"; Map "equalsS" to the "If" part of "IfWithoutElse" boolean function and then map the Field3 "then" part of "ifWithoutElse."

Pooja

Former Member
0 Kudos

Hi,

I used the same the queue shows as follow:

Supress

Supress

Supress

Supress

Supress

Supress

Value

Value

How can I get just a value to pass to target field?

Thanks

Rajeev

Former Member
0 Kudos

Hi Rajeev,

Put a remove context before your target field, then you should get value in the target.

Regards,

---Satish

Former Member
0 Kudos

hi Satish,

Even if I put remove context infront of target field , Resutls are same..

All the time constant is in the ouput even the value exist.

Queue is as follow:

null

Constant

Constant

Constant

Value

Vale

Or I need to write UDF?

Any inputs?

Edited by: rajeev raj on Sep 16, 2009 5:19 PM

Former Member
0 Kudos

Rajeev,

Did you check by changing the context to E1KVVM for field2 and 3.

Regards,

---Satish

Former Member
0 Kudos

still the same even I change the context to parent node..

Constant

Constant

Constant

Value

Value

This value i need but it displaying all the values of this particular value..

Former Member
0 Kudos

Hi Rajeev,

In your initial posting you said if the condition not satisified then you want null. So what do you mean by null? nothing or constant. Thats what the constant you are getting. If you dont want constant then simply use if without else. If you want constant then if else.

Regards,

---Saish

Former Member
0 Kudos

Satish,

I want the value if the condition is satisfies.. If not then I want a blank/constant.. Even the condition satisfies I am getting the constant/blank value..

I used:

IF

Filed1----


>

A(Constant)--


>EQUALS--


PASS VALUE TO TARGET

ELSE

CONSTANT -


PASS TO TARGET

I used remove context before target field no use

I changed context to parent node but no use

I am getting only constatn value even it satisifes the condition.. I mean I entered A in the field value

I see following in Queue

CONSTANT

CONSTANT

CONSTANT

CONSTANT

A

A

Any idea.

Rajeev

Former Member
0 Kudos

rajeev,

the equals function you should take from text standard function. did you do that?

Regards,

---Satish

Former Member
0 Kudos

Yes satish, I took EqualsS.

Former Member

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Rajeev,

You can do a logic like field2 equals to 3 then send field3 else constant. It should be straight forward and a simple if then else should work for you.

Regards,

---Satish

rajasekhar_reddy14
Active Contributor
0 Kudos

Hi,

Use if else condition,

If Filed 2=3 then map filed 3 to target,

else if filed2 not exists then map constant with blan value.

use not and exists function in else condition.

Regards,

Raj

Former Member
0 Kudos

HI,

What do you mean by not and exist function in else condition?

I used if Field2 equals B then pass field3 else pass constant..

I see all the time constant and when I see in Queue I see all the values

Cosntant

Constatn

Constant

Required value

But In the output I see only constatn even the value exist. Do let me know

Thanks

Rajeev