on 12-20-2007 9:47 PM
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 dont have anything in B then C should get value from A. But this is not happening.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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;
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Add another condtion comparing B with empty string..!! Though B does not have value.. if the node exists.. it would map that!!
VJ
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.