on 04-21-2010 7:57 PM
Hi,
I have simple requirement in PI mapping but not sure how to apply it using graphical mapping. Any help is greatly appreciated.
1. If (Source) F1 has values, populate it in (Target) F2, else don't map (Source) F1 to (Target) F1. In other words, populate (Target) F2 only if (Source) F1 is bringing in values, otherwise don't send empty values.
2. If (Source) F1 or F2 has values, pass it to corresponding fields, i.e. (Target) F1 or F2. If (Source) F1 or F2 is blank, populate (Target) F1 or F2 with constants.
Also, how to pass empty values or blank fields?
Thanks.
Hi Sangita,
Try the below solutions:
1) Compare Source F1 value against empty constant [], use ifWithoutElse function.
If value is true pass the F1 or it will get suppressed at target (no value will be pased)
2) Compare Source F1 value against empty constant [], use ifThenElse function.
If value is true pass F1 to target, or pass empty constant[].
-Tanaya.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Thank you for your replies. I tried as per your instructions but the target elements did not bring in values as expected: I guess either I did not explain properly or I did not understand you correctly. I will explain it in different way.
1. IFSource FieldX has values THEN populate it in Target FieldY ELSE display Source FieldZ in Target FieldY.
2. IF Source FieldA is blank, THEN populate Target FieldA with constant '0000', ELSE pass values of Source FieldA to Target FieldA.
I hope I am clear in explaining my requirement. Is there any blog or graphical example of above mapping requirement?
Thanks.
Use IF THEN ELSE and EXISTS standard functions
1)
X
THEN
FIELD X EXISTS IF Y
ELSE
Z
2)
"0000"
THEN
A = "" IF A Y
ELSE
A
The above is not coming clearly , if u wish send me ur email id, i will send a screen shot of what ur mapping will look like exactly
Edited by: pratichi chauhan on Apr 22, 2010 6:01 AM
Edited by: pratichi chauhan on Apr 22, 2010 6:02 AM
hi,
1. IFSource FieldX has values THEN populate it in Target FieldY ELSE display Source FieldZ in Target FieldY.
FieldX->exits->If then else
Map FieldX else map empty constnt ->(output result) check the Length using Length Function ->Greater function -> 0 (here use the simple If else condition) Map FieldX else Map FieldZ
2. IF Source FieldA is blank, THEN populate Target FieldA with constant '0000', ELSE pass values of Source FieldA to Target FieldA.
same try using above way logic....
Thanks.
Venu.
Hi,
I tried different ways of mapping and did not get the result as expected:
1. Tried as per Ramg - got exception error when using Equals.
2. Could not understand Pratichi's instructions - please send the screenshots to lms1148 at hotmail.com (Thanks).
3. Venu's method worked partly, if condition worked but else condition did not bring in other field's values, instead target field remained blank. Also cannot use Greater than -> 0 function since source fields will bring in either empty values or dynamic strings (Alphanumeric text upto 40 chars).
4. Tried using Nutan's instructions but target field came out blank with no values either of the two source fields mapped.
Please suggest if any other methods. Thank you all for your kind replies.
Regards,
Sangita
Hi,
I solved both mapping issues with the following solutions:
1. IF Source FieldX + empty constant -> equalS -> Not, THEN Source FieldX, ELSE Source FieldZ.
2. IF Source FieldA + empty constant -> equalS, THEN constant '0000', ELSE Source FieldA.
Thanks to all those helped. Closing this thread.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
1) IF F1 EXISTS, MAP F1 TO F2
2) IF F1 EXISTS MAP TO F1 ELSE IF F2 EXISTS MAP TO F2 ELSE ""
Thanks
Pratichi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
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.