cancel
Showing results for 
Search instead for 
Did you mean: 

Absolute

Former Member
0 Kudos

The value that is coming from source field(12 digits) is a negative number. The requirement is that XI has to convert this number to abloute(to positive number) and pass it to target.

But if i use abs xi function it is giving me the exponential func. Anybody have code for this?

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi,

The above suggestion to multiply with -1 is working fine if all the time the input values are negative. If in case the input values are positive then that will create the negative value. And for this NEG function in Arithmatic category is already available so no need of any UDF also

Thus follow below steps

If the source field is always have negative value then use

sourcefield--->NEG --->Target field

If the source field is always have negative value then use

sourcefield ->less(pass 2nd value as "0")->if (true)then pass sourcefield--->NEG --->Target field

->if (false)then pass sourcefield->Target field

Thanks

Swarup

Edited by: Swarup Sawant on Feb 19, 2008 6:10 AM

justin_santhanam
Active Contributor
0 Kudos

Naresh,

Just use normal Multiply function ,pass ur input and constant (-1) to it and check if it works.

raj.

ranjit_deshmukh
Active Participant
0 Kudos

use 'abs' followed by 'FormatNum' with parameter '#' only.

Ranjit

Former Member
0 Kudos

Hi,

Write a simple UDF in which mutiply the source code value with -1 and pass it to target side.

Redards,

Phani