You are on page 1of 4

6/10/2015

 

New functions in the Graphical Mapping Tool XI

| SCN

 
 
<a href=Getting Started Newsletters Store " id="pdf-obj-0-14" src="pdf-obj-0-14.jpg">
 

Hi, Guest

Search the Community

 
 

Products

Services & Support

About SCN

Industries

Training & Education

Partnership

Lines of Business

Events & Webinars

 

Innovation

<a href=stefan.grube New functions in the Graphical Mapping Tool XI 3.0 SP13 Posted by Stefan Grube in stefan.grube on Dec 29, 2005 1:27:56 AM 0 Tweet Share Like 0 1 Before you read this article, I recommend first to go through Sravya Talanki's Weblogs Message Mapping Simplified Part I and Message Mapping Simplified Part II The graphical mapping provides some useful functions with starting with XI 3.0 SP13: - The node functions mapWithDefault , formatByExample , sort and sortByKey - The statistic function index The function mapWithDefault This function provides a default value, whenever the source element is not available. This is useful function, when you want to use the content conversion of the file adapter. Look at this example: Before SP13 we had to use a combination of the functions exists and if , now we need only one function: The function formatByExample This function allows grouping of values of a tag according to values of another tag. Look at this example: " id="pdf-obj-0-93" src="pdf-obj-0-93.jpg">
Posted by Stefan Grube in stefan.grube on Dec 29, 2005 1:27:56 AM 0 Tweet Share Like
Posted by Stefan Grube in stefan.grube on Dec 29, 2005 1:27:56 AM
0 Tweet
Share
Like
0
1

- The node functions mapWithDefault, formatByExample, sort and sortByKey - The statistic function index

The function mapWithDefault

This function provides a default value, whenever the source element is not available. This is useful function, when you want to use the content conversion of the file adapter. Look at this example:

<a href=stefan.grube New functions in the Graphical Mapping Tool XI 3.0 SP13 Posted by Stefan Grube in stefan.grube on Dec 29, 2005 1:27:56 AM 0 Tweet Share Like 0 1 Before you read this article, I recommend first to go through Sravya Talanki's Weblogs Message Mapping Simplified Part I and Message Mapping Simplified Part II The graphical mapping provides some useful functions with starting with XI 3.0 SP13: - The node functions mapWithDefault , formatByExample , sort and sortByKey - The statistic function index The function mapWithDefault This function provides a default value, whenever the source element is not available. This is useful function, when you want to use the content conversion of the file adapter. Look at this example: Before SP13 we had to use a combination of the functions exists and if , now we need only one function: The function formatByExample This function allows grouping of values of a tag according to values of another tag. Look at this example: " id="pdf-obj-0-122" src="pdf-obj-0-122.jpg">

Before SP13 we had to use a combination of the functions exists and if, now we need only one function:

<a href=stefan.grube New functions in the Graphical Mapping Tool XI 3.0 SP13 Posted by Stefan Grube in stefan.grube on Dec 29, 2005 1:27:56 AM 0 Tweet Share Like 0 1 Before you read this article, I recommend first to go through Sravya Talanki's Weblogs Message Mapping Simplified Part I and Message Mapping Simplified Part II The graphical mapping provides some useful functions with starting with XI 3.0 SP13: - The node functions mapWithDefault , formatByExample , sort and sortByKey - The statistic function index The function mapWithDefault This function provides a default value, whenever the source element is not available. This is useful function, when you want to use the content conversion of the file adapter. Look at this example: Before SP13 we had to use a combination of the functions exists and if , now we need only one function: The function formatByExample This function allows grouping of values of a tag according to values of another tag. Look at this example: " id="pdf-obj-0-130" src="pdf-obj-0-130.jpg">

The function formatByExample

This function allows grouping of values of a tag according to values of another tag. Look at this example:

6/10/2015

New functions in the Graphical Mapping Tool XI

...

| SCN

We can achieve this with our new function: The other nodes are mapped with help of

We can achieve this with our new function:

We can achieve this with our new function: The other nodes are mapped with help of

The other nodes are mapped with help of the node functions splitByValue and collapseContexts like follows:

We can achieve this with our new function: The other nodes are mapped with help of

Make sure, that the context of the node ID is set to ORDERLIST in all cases.

The functions sort and sortByKey

Of course these functions are used to sort elements. Let us look at this example:

We can achieve this with our new function: The other nodes are mapped with help of

The elements in tag PRODUCT shall be sorted the same way as the elements in tag ID. As the functions sort and sortByKey only sort the elements within the same context, we have to use the function removeContexts before sort. After sort we have to restore the original contexts. We do this with the node function splitByValue The mapping now looks like follows:

6/10/2015

New functions in the Graphical Mapping Tool XI

...

| SCN

The function index This function works like the function counter . The difference is that theMichal Kraw czyk Dec 30, 2005 2:23 AM Hi Stefan :) Great to see a weblog from you, hope there will be more :) Regards, michal Like ( 0 ) " id="pdf-obj-2-11" src="pdf-obj-2-11.jpg">

The function index

This function works like the function counter. The difference is that the function index repeats counting for each context. Let us look at an example:

The function index This function works like the function counter . The difference is that theMichal Kraw czyk Dec 30, 2005 2:23 AM Hi Stefan :) Great to see a weblog from you, hope there will be more :) Regards, michal Like ( 0 ) " id="pdf-obj-2-19" src="pdf-obj-2-19.jpg">

We want the tag No to count the positions in an order. For this reason we have to provide the correct contexts. This can be done by the node function splitByValue. After creating of the correct index numbers, the values have to be separated to different contexts. This can be achieved as well with the node function splitByValue.

The function index This function works like the function counter . The difference is that theMichal Kraw czyk Dec 30, 2005 2:23 AM Hi Stefan :) Great to see a weblog from you, hope there will be more :) Regards, michal Like ( 0 ) " id="pdf-obj-2-29" src="pdf-obj-2-29.jpg">

I hope this blog will help you to understand the use of the new mapping functions.

10496 View s Average User Rating (7 ratings) My Rating: 0 Tweet Share Like 0 1
10496 View s
Average User Rating
(7 ratings)
My Rating:
0 Tweet
Share
Like
0
1

6 Comments

  • Dec 29, 2005 10:21 AM Hi Stefan, Good examples illustrating the new functions. The examples are very nice and very easy to follow. Regards, naveen

 

Like (0)

Hi Stefan :)

Great to see a weblog from you, hope there will be more :)

Regards,

michal

 

Like (0)

6/10/2015

New functions in the Graphical Mapping Tool XI

...

| SCN

  • Ashok Pathmanathan May 17, 2007 6:42 AM Hi Stefan, Your blog with clear examples solved my query in the XI forum - ' Help in mapping with 'createIf' node function'. Thanks, Ashok.

  • Aaron Myers Apr 8, 2009 11:44 AM

Like (0)

I was reading in SDN library and other sources to try and figure out SplitByValue and could never make them work. Your method of removing, adding, and then collapsing context are exactly what I needed to go from simple flat input file to a nested hierarchy.

Best regards,

Aaron

  • Roberto Villadarez Jun 17, 2009 9:44 PM Great examples. Just one comment for formatByExample.

Like (0)

You have to do sorting functionalities first before formatByExample function for data source that are not in order.

Thanks and Regards, Robert

  • Anupam Ghosh Sep 30, 2013 1:34 PM Hi Stefan, This is very helpful blog. Thank you for sharing. Regards Anupam

Like (2)

Like (0)

Use

Follow SCN