374
Views
5
Comments
Solved
Convert Negative Value to Positive
Application Type
Traditional Web, Reactive

Hello All,

Is there another way to convert negative value to positive and vice versa?

Currently, what I did is like this.

If(Value <= 0, TextToDecimal(Replace(DecimalToText(Value),"-","")), -Value)

I don't want to use JS though.

Thanks in advance.



2020-11-13 07-48-15
Khuong Truong
Solution

Hi Esrom,

Use can use abs() to convert negative to positive as Nuno said.

If you want to convert negative to positive and positive to negative I think you can use assign widget and set Value = -Value. Please take a look at this one as sample.

Best,

Khuong

2016-04-21 18-13-58
Nuno Rolo
 
MVP

Hi Esrom,

You can use the built-in function abs(). Check here.

2020-11-13 07-48-15
Khuong Truong
Solution

Hi Esrom,

Use can use abs() to convert negative to positive as Nuno said.

If you want to convert negative to positive and positive to negative I think you can use assign widget and set Value = -Value. Please take a look at this one as sample.

Best,

Khuong

2025-07-12 07-35-24
Esrom Galang

Thanks all for your answers! Always grateful for this community.

2025-07-12 07-35-24
Esrom Galang

It works with converting negative value to positive, but Nuno's and Kuongs solutions is better. Thanks!

2024-10-25 08-47-19
Eduardo Pires

Hello Esrom,


Why don't you just multiply the value by -1 ?

[your_number] * -1 

For example:

-5 * -1 = 5

5 * -1 = -5

-1.234 * -1 = 1.234

1.234 * -1 = -1.234


Best regards,

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.