cancel
Showing results for 
Search instead for 
Did you mean: 

How to remove sign

Former Member
0 Kudos

Hello All,

I have to remove negative sign(-) in message mapping and pass only positive value to the target.

Is there any standard func avble in PI?

Thanks,

Regards,

Moorthy

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

'abs' is supposed to be the standard way of doing it. But it has a bug. many a times, we have got wrong values due to the standard abs function.

However, you can also do the same by using the replace text function by replacing the '-' with empty constant.

Regards,

Ninu

Answers (1)

Answers (1)

baskar_gopalakrishnan2
Active Contributor
0 Kudos

Simple. Use abs arithmetic function. This will remove negative sign if you get in the beginning

-45 -> abs -> 45