on 05-16-2007 9:20 AM
Hi,
Can anybody help me on this below mapping problem.
I have a one source field called ITEM and corresponding target field QWERT and my requirement is whenever ITEM field is getting some value it is mapped to the correponding target field and whenever ITEM field is empty I have to send empty string to the target QWERT filed.
And I have done like this...
ITEM>EXISTS> IF WITH ELSE>--> QWERT
for true-->ITEM
for else--> constant ( with one space) given
Here the problem is... it is giving success when ITEM field with some value and It is giving error when the ITEM field with empty string.
Can any body give me the good suggestion to resolve this?? Is it UDF is required this?? If it requires help me on that front??
Cheers.,
xavi
Hi Xavi,
did this solve your problem?
If yes, please award points.
Dominic
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi ;
Try this UDF
function type context
for(int i=0;i<ITEM.length;i++)
{
if(ITEM<i>.equals("true"))
{
result.addValue(ITEM<i>);
}
else
{
result.addValue(" ");
}
}
ITEM>EXISTS>REMOVECONTEXT --> UDF -->QWERT
Mudit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Xavi,
you could use the standard function "mapWithDefault" with an empty string.
Regards
Dominic
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
By default it will assingn empty string if the "if" fails. I dont think u need an else
regards
krishna
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.