cancel
Showing results for 
Search instead for 
Did you mean: 

HANDLING THE LOGIC

former_member229127
Participant
0 Kudos

Hi all ,

As am new to PI their is a mapping error while am building the logic .

The error is when the field is been picked up 2 times in the mapping with the same logic ,it is throwing error for this !!

As for the field MASSG and the field ACT_TEXT their is same logic from the ECC side

For the MASSG the mapping logic is  ( sort is used for to pick the value from descending order)

and for the ACT_TEXT the logic is


Now the error from this is !!!

the file format of wrong !!! as the value of ACT_TEXT is been placing down to Massg field . And also when it is blank also the field is not displaying in the output segment for the massg field as off i have used map with default also .

Please help me out in these !!!!

thanks in advance


Best regards,

Sandhya

Accepted Solutions (1)

Accepted Solutions (1)

vijender_p
Active Participant
0 Kudos

Hi Sandhya ,

It may be context handling problem from your side so can you use these logic

MASSAN > Fix Values > Sort > by descending > collapse context  > SplitByeachValue  > ACT_TEXT

Let me Know if you face any issue

BR
Vijender

Answers (1)

Answers (1)

pvishnuvardan_reddy
Active Contributor
0 Kudos

Hi Sandhya,

Can you please share the display queues of MASSN for the payload which is throwing the error.

Regards

former_member229127
Participant
0 Kudos

Thanks for the reply!!!

this is Queue for Massg and ACT_TEXT

And the output file is throwing like this !!!

pvishnuvardan_reddy
Active Contributor
0 Kudos

Hi Sandhya,

For the first occurrence of target field MASSG, if you see the display queue, it is suppressed, hence you can see the issue which you are talking about.

Can you please swap map with default and sort functions in the mapping logic of massg target field and check the outcome.

Regards

former_member229127
Participant
0 Kudos

Hi Vishnu !!!,

When i have change to as per your logic !!!
am getting Boolean error ..

can you please provide me any UDF for this ??

Regards,

sandhya

pvishnuvardan_reddy
Active Contributor
0 Kudos

Hi Sandhya,

You have removed both sort & MapwithDefault functions in the logic.

Can you please interchange sort & MapwithDefault functions in the below logic and check the outcome.

If still this doesn't work, then we can go for udf. Also, please elaborate the requirement if we want to go for udf.

Regards

sahithi_moparthi
Contributor
0 Kudos

Hi Sandhya,

Please try below logic:

For Massg Field:

UDF to removeSuppress Value:

for (int i = 0; i < var1.length; i++) {

if (var1[i]!=ResultList.SUPPRESS )

{

  result.addValue(var1[i]);

}

}

In the above screen shot Id refers Massn and Item refers Massg.

Please try and let us know if still issue persits.

former_member229127
Participant
0 Kudos

Thanks for the reply!!!

And the error is same !!! the field is replicating in the first record but when it for multiple records means the the issue is same

pvishnuvardan_reddy
Active Contributor
0 Kudos

Hi Sandhya,

Can you please elaborate the requirement, so that we can look out for UDF for achieving the same.

Regards

former_member229127
Participant
0 Kudos

hi vishnu !!!

As per this for the field massg(source) when the field massn is 0I and 0H  then it should replicate the out put file as output file  and it should the first value of the queue ( as when use sort function and keep descending ) and o/p field is also named as massg

&&  when the field Massn is 0I it should be voluntary leaver and 0H it should be involuntary leaver for the output field Act_text

best regards,

sandhya

former_member229127
Participant
0 Kudos

Hi sahithi ,

As per this it is running fine for the field Massg but, when i have checked whole records means the ACT_Text field is replicating into the previous field as it is moving to massg field .

best regards,

Sandhya

pvishnuvardan_reddy
Active Contributor
0 Kudos

Hi Sandhya,

For the record where this issue is occuring, can you let us know whether Massg field is having any value or is it getting suppressed. If latter is the case, then this is cause of the issue.

Also, let us know whether the logic is working fine or not for ACT_Text field.

Regards

former_member229127
Participant
0 Kudos

Hi Vishnu for the logic MASSG logic is working but not for the ACT_TEXT

Please help me out in these

Best regards,

Sandhya

pvishnuvardan_reddy
Active Contributor
0 Kudos

Hi Sandhya,

When you talk about the issue of ACT_TEXT getting replicated to MASSG field in the output file,are you using any content conversion to convert the xml file into flat file.

Can you share the xml file screen shot and flat file screen shot for sample issue record.

Regards

former_member229127
Participant
0 Kudos

It is a CSV file Vishnu.

pvishnuvardan_reddy
Active Contributor
0 Kudos

HI Sandhya,

Can you check whether the mapping logic is working fine or not for ACC_TEXT field.

Also, please share the screen shots of the issue for better understanding.

former_member229127
Participant
0 Kudos

Thanks for patients Vishnu !!

Now the Logic is working !! with the logic of Vijender 

Best Regards,

Sandhya