Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

how to concatenate string in simple transformations?

Former Member
0 Kudos

Hi,

I want to use a business field (data that is passed via ROOT to a simple transformation) to build a URL.

For ex. business field 'product_name' contains the value 'ipod'. Now, within the simple transformation, i want my xml to look link this:

<product name = ipod link="http://google.com/ipod"/>

I want the "ipod" in the link attribute to be picked up from the business field. In other words, i want to concatenate: "link="http://google.com/" and product_name.

How can i do this string concatenation within simple transformation?

Regards,

Ram

4 REPLIES 4

former_member387317
Active Contributor
0 Kudos

Hi

You can use CONCATENATE statement for it..


PRODUCT_NAME = 'ipod'.
CONCATENATE 'http://google.com/' PRODUCT_NAME INTO LINK.

Now the Link Variable will be having

http://google.com/ipod

Hope it will solve your problem..

Thanks & Regards

ilesh 24x7

ilesh Nandaniya

0 Kudos

Hi,

I want this logic to be put inside the Simple Transformation.

Regards,

Ram

0 Kudos

Can you clarify what do u mean by Simple transformation

Former Member
0 Kudos

Hi,

I've been trying for some time now and still no idea how (/if) it is possible. Just to add clarity to the issue i'm facing, in XSLT, to concatenate strings with the data values, for ex. to create a URL, the following code will work:

<prodct name='{$product/name}' *product_link='http://google.com/search?{$product/name}'*/>

I want to achieve the above functionality (building the product_link attribute) with simple transformations. Is this possible? If yes, how? Any help in this regard is deeply appreciated.

Thanks,

Ram