cancel
Showing results for 
Search instead for 
Did you mean: 

How to remove "SUPPRESS" in graphical mapping

Former Member
0 Kudos

Hey,

I have a problem in a graphical mapping and need to remove a "SUPPRESS" entry in the queue. There are several entries in the queue and one of them is "SUPPRESS", and this entry causes a wrong result of the mapping. I have tried several possibilities, but I haven't found a fitting solution yet.

Does anyone know how to handle this issue?

Thanks a lot!!

Sebastian

Accepted Solutions (1)

Accepted Solutions (1)

Bhargavakrishna
Active Contributor
0 Kudos

Hi Sebastin,

Try this UDF

public void removeSUPPRESS(String []Input,ResultList result,Container container) throws StreamTransformationException

{

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

     {

          if(!(Input<i>.equals(ResultList.SUPPRESS)))

          {

               result.addValue(Input<i>);

          }

     }

}

It simply removes all the SUPPRESS entries that you have in your display queue and will pass only the non SUPPRESS values to the output.

modify the code according to your requirement.

Or

You can use remove context, followed by the Split by value.

Hope it will helpful..

Regards

Bhargava krishna


Answers (3)

Answers (3)

ambrish_mishra
Active Contributor
0 Kudos

Hi Sebastian,

You can try removeContext/split by Value but if the source queue has variable values in the contexts, it won't work else try with the UDF suggested in other posts to check ResultList.SUPPRESS and that should work.

Ambrish

Former Member
0 Kudos

Hi Sebastian,

You can use below UDF to achieve your requirement:

public void removeSuppress(String[] contextValues, ResultList result, Container container)

{

        if (contextValues != null && contextValues.length > 0)

        {

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

            {

                                                       if (contextValues[i] != null &&                !ResultList.SUPPRESS.equalsIgnoreCase(contextValues[i]))

               {

                                                                 result.addValue(contextValues[i]);

                }

                                        }

      }

}

Thanks

Rakesh Sharma

siddhardha_dnk
Active Participant
0 Kudos

Hi Sabastian,

Using the following UDF should clear your issue...

public void RemoveSuppress(String[] a,ResultList result,Container container){

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

{

if (!a<i>.equalsIgnoreCase(ResultList.SUPPRESS))

{

result.addValue(a<i>);

}

}

Regards,

DNK Siddhardha.