function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Nishad BashaNishad Basha 

How to change the negative value to positive value in salesforce?

User-added image

How i change the -24 (negative value will be changed to positive ) how to solve the above scenario please give some ideas.
salesforce mesalesforce me
Hi Basha..

What I'm asking is how do I set up a formula that will automatically take the value of, and reverse positive/negative value each time?

If that's what you are asking, then multiplying by -1 is the answer

100 * -1 = -100 -100 * -1 = 100

AB TestAB Test
  Please find the Solutions below :
  • You can create a formula field to store the Negated amount by multiplying it by -1. (It is preferrable only if you need to show it on the standard detail page).
  • You can update the same field you are storing the original value using trigger. If you need not maintain the negated amount seperately.
  • If you are using VF page , you can do it through apex on controller side.
Don't forget to mark the answer as best answer or like it in case it helps you. :)