cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple input arguments in User defined funcions

Former Member
0 Kudos

Hi Experts,

I have a file to proxy sceanrio.Have to do one to one mapping of all the corresponding fields except 3 fields. for eg

1) - <Services>

<DisplayValue>Tax>Business Tax</DisplayValue>

</Services>

Sender Receiver

===== ========

Tax Functions

under the services tag the "Tax" is one of the sender's field .I need to map this "Tag" to the receiver field called as "function".My question is: can we do wz some user defined functions or we have to use java functions.If we use Java,what way we can implement in PI 7.1 because,i guess we can not use the multiple input arguments.

2) similarly,

- <LineOfBusiness>

<DisplayValue>Consumer Markets>Retail</DisplayValue>

</LineOfBusiness>

Sender Receiver

===== ========

Retail Sector

Retail is one of the sender field.it should be mapped wz another field "Sector" at receiver side.how to pick up the retail field and map it to the receiver side.Is there any user define function for this or we have to write java code if we have to go for Java,how it will be implemented in PI 7.1

3) similarly,

- <GeographicLocation>

<DisplayValue>Americas>North America>Null>United States & Virgin Isl.>United States,US,USA,United States of America</DisplayValue>

</GeographicLocation>

Sender Receiver

===== ========

Americas Region

North America Sub region

Null Area

UnitedStates,US,USA,United States of America Territory

As u all can see,the above corresponding sender fields should be mapped to Receiver fields.It all has coem under one line in XML.How to pick it up and map 1 to 1 at the receiver side bcoz receiver wants it as a separate fields.Is there any user define function for this or we have to write java code if we have to go for Java,how it will be implemented in PI 7.1

Experts,please help me out as this is a live scenario.

Thanks in Advance

Veeru

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

ok

former_member181962
Active Contributor
0 Kudos

Hi Viru,

Your Source structure is kind of confusing.

Can you post the Exact structure of the source?

And there is no limitation in PI like, you cannot have multiple input arguments in PI.

YOu CAN have multiple input arguments for your UDFs.

Use the + button the UDF editor to have multiple input arguments.

REgards,

Ravi Kanth Talagana

Former Member
0 Kudos

Hi,

here is the partial structure.pls have a look.

<Services>

<DisplayValue>Tax>Business Tax</DisplayValue>

</Services>

- <LineOfBusiness>

<DisplayValue>Consumer Markets>Retail</DisplayValue>

</LineOfBusiness>

- <GeographicLocation>

<DisplayValue>Americas>North America>Null>United States & Virgin Isl.>United States,US,USA,United States of America</DisplayValue>

</GeographicLocation>

I have to do mapping b/w tax and some receiver field and it is a 1 to 1 mapping.how to extract teh field "tax" from that beause there is also a field name "business tax ".

same with the field name "Retail" .

and also with the field names Americas>North America>Null>United States & Virgin Isl.>United States,US,USA,United States of America

I have to extract one-one field and map to corresponding single fields at the receiver side.

Have i presented properly.

Please help me out.

Thanks

Veeru

Former Member
0 Kudos

Hi Viru,

You can take the value in between display value and can write a udf for getting the value before >, so that we can get the value Tax, Consumer Markets.

But I am struck on the 3rd one becasue there are multiple >. Can you please tell us what do u want the output from the Americas>North America>Null>United States & Virgin Isl.>United States,US,USA,United States of America.

Also your requirement is not quite clear. So can you please throw some more light.

Regards,

---Satish

Former Member
0 Kudos

Dear Satish,

Can u help me in writing UDF for this in PI 7.1.As i am not aware of java.

In the 3rd part that is

<GeographicLocation>

<DisplayValue>Americas>North America>Null>United States & Virgin Isl.>United States,US,USA,United States of America</DisplayValue>

</GeographicLocation>

1) America will be mapped to "Region" of receiver field

2) North America will be mapped to "Subregion" of receiver field

3) United States & Virgin Isl will be mapped to Area of receiver field

4) United States,US,USA,United States of America will be mapped to Terriotoy of receiver field.

But how tto extract these values and map to corresponding fields at receiver value.

Receiver want this as a separate values,as they are maintaining it as a separate fields.

Pls help me out.

Thanks

Virendra