on 03-07-2011 10:18 AM
Hi
I have a condition were in if a field value is A1 i should pass it as 01 to target and if its A2 i should pass it as 02 to target side..
We can do it using fixed valued fn..But if the field value is anything othet than A1 or A2 what ever comes it has to be passed over unchanged..
How to get it..Do we need a UDF or standrd fns can do it?
Hi,
In addition to the above suggestions. Chk this also:
if(var.equals("a1"))
{
return "01";
}
else if (var.equals("a2"))
{
return "02";
}
else
{
return var;
}
Thanks
Amit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Its one of the common requirement in mapping.
Use Fixed value and to handle the requirement of anything other than A1 or A2: Failure Behavior in FIX values (in the top part of fix value window) just select the option "Use key"..it will take care
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In "fixed value" you can set default value to source field.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
right below the default value there are 3 radio buttons for Failure Behavior ..just check the "Use key" one..
Actually thats where we ask PI mapping how to react if none of the mappings in the fix value satisfies the condtion.
We will have 3 option then:
1. Default value: which we can provide there
2. Use key: pass whatever is coming in the source
3. Throw exception.
Edited by: Puneet Singhal on Mar 7, 2011 11:47 AM
Hi Prabhas,
If you select the FixValues function from Convesion and double click on it, the following options should be visible:
1.Default Value: (not required in your scenario)
2.Behaviour if Lookup Fails: (Options in round check button are)
a) Use Key - - - select this option
b) Use Default Value (picks value from point 1) - - - not required in your scenario
c) Throw Exception - - - not required in your scenario
3. Value to be entered with + addition and - deletion button for entries
key value
A1 01
A2 02
Hope this helps.
Regards,
Souvik
User | Count |
---|---|
81 | |
24 | |
11 | |
9 | |
7 | |
5 | |
5 | |
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.