Skip to Content
avatar image
Former Member

Mapping - Filtering criteria

Hi Friends,

In my source structure i have one of the field called "Purchase ID". I need to map this field to target based on one criteria as follows :

Only the following Purchase ID's should be considered from source xml.

Purchase ID

100

101

Requriment :

If there is any other values for Purchase ID other than (100 ,101) . Those set of records need to be dicarded . It should not go to target remaning other valid records will have to go to target.

For eg :

We have 100 records out ofwhich 50 records are not having the values either 100 or 101 hence this records should not go to

Target.

Kindly guide me.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    avatar image
    Former Member
    Oct 07, 2010 at 06:15 AM

    Hi,

    Use FixValues function, in this put 100 & 101 in key and value columns both.

    And put null value( don't enter anything in defualt value) and choose 'use default value'.

    Source --> FixValues ---> equalS -


    >not -


    > ifWithoutElse -


    > Target

    Constant[] -> Source >

    Constant[] is given to the second input of equalS.

    -Supriya.

    Edited by: Supriya Sawant on Oct 7, 2010 8:16 AM

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 11, 2010 at 12:56 PM

    Please Renu PI

    I have same problem.

    Can share de udf code ?

    tks

    Marco

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      UDF Code:

      Pass argument : fvalue

      choose : All values of context

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

      if (fvalue<i> == 100 || fvalue<i> == 101 || fvalue<i> == 102 || fvalue<i> == 103 || fvalue<i> == 104 || fvalue<i> == 105 )

      {

      result.addValue("true");

      }

      else

      {

      result.addValue("false");

      }