Skip to Content
avatar image
Former Member

Need Help in UDF?

Hi,

Iam doing File to Mail Senario, i have to send an Attachment in the mail.

Iam doing mapping for content

File structure

Row 0 ...Undounded

feild 0..Undounded

Iam mapping the field vaule to content in Mail package.

in sender side i have file in 10 rows

Row1

Row2

Row3

Row4

Row4

Row5

....

in mail attachement iam geting data as

Row1_cC_Row2_cC_Row3.................

Iamnot geting data in 10 Rows,i wrote an UDF for this its not working.

int length=data.length;

StringBuffer sb=new StringBuffer();

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

{

sb.append(data<i>+"\n");

}

result.addValue(sb.toString());

Please Help in this Issue

Regards,

Phani

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Nov 07, 2007 at 11:44 AM

    Just put in an if condition

    int length=data.length;

    StringBuffer sb=new StringBuffer();

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

    {

    if(!data.equals(ResultList.CC))

    {

    sb.append(data<i><i></i>+"\n");

    }

    }

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Varun,

      Iam not geting any data in the Mail Attachment,can u try some other code and give it.

      Thanks and Regards,

      Phani

  • avatar image
    Former Member
    Nov 07, 2007 at 04:08 PM

    Hi ,

    can you do the mapping using the "CopyValue" under Constants.

    Source Target

    Row0...unbounded ->CopyValue(0)->Row1

    Row0...unbounded ->CopyValue(1)->Row2

    Row0...unbounded ->CopyValue(2)->Row3.....I thinkn this will work for you.

    Regards

    Sunil.

    Add comment
    10|10000 characters needed characters exceeded