cancel
Showing results for 
Search instead for 
Did you mean: 

Graphical Mapping skipping based on Condition

Former Member
0 Kudos

Hi,

I want to put one condition in my mapping.. that is.. if the input field is particular value( for example input field value is <b>*</b> ).. then i want to skip the mapping... otherwise mapping will be need to execute normally..

based on this condition.. what are the nodes and what are the functions we need to take..

Thanks

Babu

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

>>>if the input field is particular value( for example input field value is * ).. then i want to skip the mapping... otherwise mapping will be need to execute normally..

You can use XPath expression/context objects to achieve this @ interface determination or Receiver Determination.

Regards,

Jai Shankar

Answers (6)

Answers (6)

prateek
Active Contributor
0 Kudos

Havent tried but: In Interface Determincation step -> standard -> try using more than one interfaces and interface mapping.

Regards,

Prateek

Former Member
0 Kudos

Hi,

What do you mean by skip mapping....do you want to break mapping?

If structures would be...

source

-val1

-val2

target

-trgt1

-trgt2

one solution is check source field->equalsS->(constant).....(creatif) then generate 'target' node.This will help you out.

Regards,

Akshay.

    • reward points if find useful.

Former Member
0 Kudos

Hi

can you please clarify on the line skip the mapping:

and according to your question you can use the following functions in mapping

you can use the following udf

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

{

if(a<i>.equals("*"))

{

result.addValue(ResultList.SUPPRESS);

}

else

{

result.addValue(b);

}

}

in udf a in the field on which you are checkingg the condition

and b is the output that you want to pass on the true condition

if you still have doubt please reply back

Thanks

Rinku

Former Member
0 Kudos

Hi BABU,

Use <b>IF, EQUALS, NOT</b> & <b>CONSTANT</b> functions to map your target field as shown below.

<b>IF</b> <b>NOT</b> InputFiels <b>EQUALS</b> constant value<b>"*"</b> THEN -


> TargetField.

By mapping this way it will check all <b>""</b> values coming from your input fields, and will only pass those values which don't have <b>""</b> value.

Regard,

Sarvesh

santhosh_kumarv
Active Contributor
0 Kudos

Hi Babu,

Use the XPath expression in the receiver determination.

XPATH:

XPath is an expression language that allows the processing of values conforming to the data model which provides a tree representation of XML documents as well as atomic values such as integers, strings, and booleans. The result of an XPath expression may be a selection of nodes from the input documents, or an atomic value, or more generally, any sequence allowed by the data model. It is an hierarchic addressing of the nodes in an XML tree.The primary purpose of XPath is to address the nodes of XML trees. XPath is designed to be embedded in a host language such as XSLT and XML.

<a href="http://www.w3.org/TR/xpath20/">XPATH</a>

Also have a looka th this blogs

<a href="/people/shabarish.vijayakumar/blog/2006/06/07/customise-your-xpath-expressions-in-receiver-determination your 'XPATH' Expressions in Receiver Determination</a> By Shabarish Vijayakumar

<a href="/people/shabarish.vijayakumar/blog/2005/08/03/xpath-to-show-the-path-multiple-receivers to show the path (Multiple Receivers)</a> By Shabarish Vijayakumar

Regards

San

Former Member
0 Kudos

hi

In graphical mapping u have function mapWithDefault.

This will solve your problem. Go through this blog as an example

<a href="/people/stefan.grube/blog/2005/12/29/new-functions-in-the-graphical-mapping-tool-xi-30-sp13:///people/stefan.grube/blog/2005/12/29/new-functions-in-the-graphical-mapping-tool-xi-30-sp13

Please reward points if u find it useful

Anu Singhal