cancel
Showing results for 
Search instead for 
Did you mean: 

Boolean mapping question

Former Member
0 Kudos

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.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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.

Former Member
0 Kudos

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.

Former Member
0 Kudos

Hi

Before if else condition, use Equals & Not node function

FieldX =====

Equals(Text) ---> Not -- > Ifelse condition

Constant (no value) =====

Then Field X and in else Condition specify FIeldZ

Thanks

Ramg.

Former Member
0 Kudos

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

Former Member
0 Kudos

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.

Former Member
0 Kudos

HI Sangita,

1.> If FieldXLength(Text function)equalsConstant(0)thenFieldX---Target

elseFieldZ-----Target

Use If then else function.

2.> If FieldAlengthequals 0thenConstant(0000)---Target

else-FieldA----


Target

same If then else

Regards,

Nutan

Former Member
0 Kudos

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

Answers (2)

Answers (2)

Former Member
0 Kudos

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.

Former Member
0 Kudos

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