Skip to Content
avatar image
Former Member

UDF Req: urgent

Hi All

i am begineer in the XI kindly help me with this UDF.

i am checking the value of the field1 = ### then target root node should be created.

if field1 == ###

i dont want to map to the target root node

else

i want to send the value to the root node

this is mu UDF

//write your code here

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

{

if(field<i>.equalsIgnoreCase("###"))

{

result.addValue(ResultList.SUPPRESS);

}

else

{

result.addValue("true");

}

}

this is not working, only else part is working for all inputs

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • avatar image
    Former Member
    Sep 19, 2007 at 07:22 AM

    if(field.equalsIgnoreCase("###"))

    {

    result.addValue(ResultList.SUPPRESS);

    }

    it should be (field<i>.equalsIgnoreCase("###"))

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      I'm sorry for the previos post i intended to give the field array index but it's not getting printed...

  • avatar image
    Former Member
    Sep 19, 2007 at 07:27 AM

    Can you please give the source and target structure with occurence of nodes

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 19, 2007 at 11:11 AM

    Hi,

    Check this,

    UDF type is Context. Input is field , output map with target node.

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

    {

    if (field<i>.equals("###") )

    {

    }

    else

    {

    result.addValue(""field<i>"");

    }

    }

    -Rohit

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi,

      Provide details of source and target structure precisely and also the requirement that you have.

      From what you have mentioned, it seems that root node is getting created for 450 value and is suppressed for 000. However, the value fields under root node is not accepting value against 450 but against 000.

      Bhavish