cancel
Showing results for 
Search instead for 
Did you mean: 

Is there any way to read the Value mapping input values dynamically?

Former Member
0 Kudos

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.

Accepted Solutions (1)

Accepted Solutions (1)

udo_martens
Active Contributor
0 Kudos

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

Former Member
0 Kudos

its 7.0 version.. i dont any radio button here :-(..

any other easy way to handle the null or the values other that that are given in value mapping?..

Former Member
0 Kudos

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

Answers (2)

Answers (2)

Former Member
0 Kudos

hey guys.. thanks alot for the help.. issue is resolved!!... will get back if i find any new error

JaganMohan
Participant
0 Kudos

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.

Former Member
0 Kudos

Yes.. i am trying to write an UDF.. but how to check wether an input( dynamic value) has a an output value in the value mapping table? can you help me out by suggesting the corresponding functions and soon..

JaganMohan
Participant
0 Kudos

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