cancel
Showing results for 
Search instead for 
Did you mean: 

Output of IfWithElse is Suppressed

former_member192105
Participant
0 Kudos

Dear Experts,

I have a mapping logic which has a IfWithElse function; this function shows proper input (for else part) but the output is SUPPRESSED when Display Queue is choosed. Also the target field is not getting filled.

When the IF part is satisfied I get proper output and value comes in Target field. However when the ELSE is executed the output is SUPPRESSED. Why does this happen and how to avoid this?

Please let me know the solution to this.

Thanks in advance.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

I think you have to check the input that you are passing to else part and also check the output of the else part.If you are using some more standard function after IF then you should check the input and output of each using the Display Queue.

Thanks and Regards,

Kubra Fatima.

former_member192105
Participant
0 Kudos

Hello,

When I check the queue for IfWithElse, I can see the value for Else part getting populated properly (and even visible in the Input queue) just that the output queue shows SUPPRESS i.e. is no value is coming out of the IfWithElse. There is no other function used between IfWithElse and the Target.

Source_Structure:

<SOURCE>

--><MAT>

--><Num>

--><Name>

--><Node1>

-


><Field1>

-


><Field2>

Target_Structure:

<TARGET>

--><Node1>

-


><Field1>

Mapping logic:

Field1 (exists AND equalsS = abcd) --> IfWithElse (then map Field2) --> Field1

(else map MAT)

Now while testing if I delete the Node1, then ideally I should get the output as MAT populated to TARGET --> Field1, but it is getting suppressed.

Any solution for this? It seems to be a very simple issue, just I am not able to get to it.

markangelo_dihiansan
Active Contributor
0 Kudos

Hi Abhishek,

Mapping logic:

Field1 (exists AND equalsS = abcd) --> IfWithElse (then map Field2) --> Field1

(else map MAT)

You can try using this mapping logic:

Field1 --> mapWithDefault --> equalsS:abcd --> ifThenElse(then map Field2) --> Field1

(else map MAT)

Hope this helps,

Former Member
0 Kudos
Mapping logic:
Field1 (exists AND equalsS = abcd) --> IfWithElse (then map Field2) --> Field1
(else map MAT)
Now while testing if I delete the Node1, then ideally I should get the output as MAT populated to TARGET --> Field1, but it is getting suppressed.

You are getting supressed because your logic says so. When you delete NODE1 the if part doesn't get any value and hence everything gets suppressed. For your logic to work fine the field should be present but without any value. Deleting the field altogether leads to teh SUPPRESSED thing.

Use a mapWithDefault before if and then your logic will work properly. mapWithDefault introduces the constant value if your field doesnt come. No need of using exists.

Field1 -> mapWithDefault(blank contant)-> equalsS = abcd --> IfWithElse (then map Field2) --> Field1

(else map MAT) and it will work.

Regards

Soumen...

former_member192105
Participant
0 Kudos
You are getting supressed because your logic says so. When you delete NODE1 the if part doesn't get any value and hence everything gets suppressed. 
For your logic to work fine the field should be present but without any value. Deleting the field altogether leads to teh SUPPRESSED thing.

Thanks for the detailed information, it was indeed a big blunder from my end.

Problem solved.

Answers (0)