cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping

Former Member
0 Kudos

Hi

I am doing a test interface. i have used simple graphical mapping but i need to take care of one field where in if the value coming from the input file is negative then it has to be ignored and positive value has to be taken into consideration.

what function can help me achieve this ..

Accepted Solutions (0)

Answers (6)

Answers (6)

Former Member
0 Kudos

as u want to ignore value if it is -ve

use ifWithoutelse

check if source_field > 0 ...map it to target

Former Member
0 Kudos

I suggest you to give a look also to the following blog

/people/sravya.talanki2/blog/2005/08/16/message-mapping-simplified--part-i

Salvatore

Former Member
0 Kudos

Hi Amit

Your question mean two thing

1) U want only proceed if value in input is positive and ignore if it is negative

2) u want only positive value no matter value coming is negative or positive

Craete UDF like..

For first option 1) It is simple crateif already have

For option 2)

public String onlyPositiveValue(String a){

String result = String.valueOf(Math.abs(a));

return result;

}

reward point if it help u

prateek
Active Contributor
0 Kudos

Use "substring" function. Extract the initial value and then use "equals" function. Then map according to the boolean output

Regards,

Prateek

former_member184619
Active Contributor
0 Kudos

Hi Amit,

Simply check if value > 0

use createif standard Function.

check this for example

/people/sravya.talanki2/blog/2005/12/08/message-mapping-simplified-150-part-ii

Sachin

nisarkhan_n
Active Contributor
0 Kudos

go to the artihmetic fucntion and check the function negative there this should help you...is the valeu coming like -09.00 always with the -ve sign then you can also use the startswith fucntion i guess.