cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with Retrive the Records from flat file

Former Member
0 Kudos

Hi All,

My problem is I am using outbound is FlatFile, and it has to Convert into Xml File

condiotn is I should send one perticular country Records only among all the country's Records exists in the FlatFile

DataStructur is

Ven_DS

Ven_Rec

Ven_Row

Vender_Name

Vender_City

Vender_State

Vender_Country

for that I have Create one UDF name like country

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

{

if(a<i>.eauals.("INDIA"))

{

result.addValue(b<i>);

}

else

{

result.addValue(ResultList.SUPPRESS);

}

}

I am confusing at Message Mapping how should do the mapping for this help me this

Thanks and Regards

Ashok.

Accepted Solutions (1)

Accepted Solutions (1)

justin_santhanam
Active Contributor
0 Kudos

Ashok ,

U don't even need UDF for it

Please see the below URL for reference.

http://www.flickr.com/photo_zoom.gne?id=641172220&size=o

If you have any doubts ,reply back.

Ashok, if you get the ouput as only one value populated in the target field, then use as per my mapping u have to insert Splitbyvalue[EachValue] before the target node. I mean in btw If and target.

Hope it helps.

Best regards,

raj.

Answers (3)

Answers (3)

sridharreddy_kondam
Active Contributor
0 Kudos

Ashok,

If you need records for only one country then you can simply use Standard functions ... no need of UDF..

Use like this

first map the target node with country field ...give condition such that only if country is India then create the target node...

<b>If (Country) is IN then map then createIf Target node</b> ....

and remainig field level mapping everything will be normal...

This will solve your prob..

Regards,

sridhar

agasthuri_doss
Active Contributor
0 Kudos

Hi Ashok,

No Need of 2 arguments in the UDF since 1 parameter.

Regards

Agasthuri Doss

MichalKrawczyk
Active Contributor
0 Kudos

hi,

if you use this UDF for segment creation (of target message)

it will only create segments when Vender_Country = INDIA

so it will do the filtering

connect Vender_Country - UDF - removeContext function - target Segment

Regards,

michal

-


<a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a>

Former Member
0 Kudos

Hi Michal,

my Target structure is also same as Sender structre

My UDF has 2 arguments if mapp Vender_Country to UDF what about the other argument in UDF. Can you help me this

Thanks,

Ashok

moorthy
Active Contributor
0 Kudos

Hi,

Why do you need 2 arguments for the UDF..

you need to have one parameter as input argument,

When you create the User Defined Function, you are giving the no. of parameter. then give only one parameter for e.g a.

Then as Michal suggested continue

Also try out with Create-IF node functions without UDF

Rgds,

Moorthy