cancel
Showing results for 
Search instead for 
Did you mean: 

Graphical mapping not workig for IF else

Former Member
0 Kudos
72

Hi,

I have two fields A and B in source side and i have to map it to C in the destination side depending on the condition.

The condition is If there is any value in B then map B to C otherwise map A to C.

Here A is mandatory B is optional and C is mandatory fields.

I mapped it like: if B exists then --> pass this to IF else --> if true map B ; in else condition A to C.

My problem is if I have any value in B it is working fine. But if I don’t have anything in B then C should get value from A. But this is not happening.

Accepted Solutions (0)

Answers (3)

Answers (3)

prateek
Active Contributor
0 Kudos

The problem is tht in all the cases, the node B exists. When u send the value, then B holds the value, otherwise it is an empty field. So u may put another condition checking for tht.

Regards,

Prateek

Former Member
0 Kudos

An empty tag will still map

You could create a UDF with two inputs A and B

Test the value of B and if it exists then output B to C else output A to C

Add some code like

if(b.equals(null) || b.equals(“”))

return a;

else

return b;

VijayKonam
Active Contributor
0 Kudos

Add another condtion comparing B with empty string..!! Though B does not have value.. if the node exists.. it would map that!!

VJ