on 01-12-2010 1:08 PM
Hi all..
I have a scenario where i have used value mapping. now the issue is when the input is not having any corresponding output value in value mapping then i should get null as output. can anyone suggest how can this be achieved?..
Regards
Anu.
Hi Anu,
this is pretty easy:
The Value Mapping function has a radiobutton for fail behaviour: Choose "Use Default Value" and store the corrsponding value (null) in the field "Default Value".
Regards,
Udo
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Do you know if the value in not maintained/found in the value mapping then it returns the same value as a result at runtime.
So, simply if and else will help you to get your desired result..
SourceField ---> ValueMapping------>|
|----->equalS---IF---->Then -----> Map constant (null) ----> Target
SourceField------------------------>|
Else ---->map (SourceField ---> ValueMapping) --->Target.
Regards,
Sarvesh
hey guys.. thanks alot for the help.. issue is resolved!!... will get back if i find any new error
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear Anu,
You can go with standard functions or write UDF to check the output of the value mapping (means after value mapping) and the souce for the value mapping (input field) are same then you can pass NULL. Put one if-else condition.
Regards,
JP.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear Anu,
Pass the input value as it is to first UDF parameter. And then pass the input to value mapping and pass the output of value mapping to second UDF parameter. Now the coding like as follows.
if(a != b){
return b;
}
else{
return null;
}
Regards,
JP.
Edited by: Jaganmohan Ponmani on Jan 12, 2010 7:16 PM
Edited by: Jaganmohan Ponmani on Jan 13, 2010 10:19 AM
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.