cancel
Showing results for 
Search instead for 
Did you mean: 

How to remove SUPPRESS from the queue using java function - not node functi

Former Member
0 Kudos

Here's what I have....

123

234

[SUPPRESS]

233

[SUPPRESS]

100

345

[SUPPRESS]

I want to remove "SUPPRESS" using a UDF.

So I'm trying this and it does not seem to work....

String sField = "*";

String rField = "S";

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

{

if (a<i>.equalsIgnoreCase(sField))

{

result.addValue(rField);

}

result.addValue(a<i>);

}

I tried "SUPPRESS" and "*".

Any idea?

Thanks!

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member189558
Contributor
0 Kudos

Hello Pam,

Try to check for two consequetive context changes to trap suppress..

The code will look like:

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

{

if (a<i>.equals(ResultList.CC) && a[i+1].equals(ResultList.CC)) {

// add what you want to add here .. else just go to the else section

}

former_member214364
Active Contributor
0 Kudos

Hi Kamath,

you can capture SUPPRESS in Java code by comparing with

<b> ResultList.SUPPRESS</b>

for example

for(int k =0 ; k< a.length; k++)

{

if(a[k].equalsIgnoreCase(ResultList.SUPPRESS))

................

else

.....................

}

Please Let me know if there are any issues.

Cheers,

Jag

justin_santhanam
Active Contributor
0 Kudos

Kamath,

Can u confirm whether your output must look like

123

234

S

233

S

100

345

S

raj.