cancel
Showing results for 
Search instead for 
Did you mean: 

respect fields decimal places when updating using formula

Tiffany
Enthusiast

I am using this formula (${Commission__c}/100)*${Total_Price__c} to update a currency field with 2 decimal places, it returns more decimals and causes the next user to edit the object to get an error. Example data (16.2/100)*772.23 populates 125.10126 in the currency field. Is there a way I can have it return 125.10 ? 

1 ACCEPTED SOLUTION

AnthonyValidity
Validity Team Member
Validity Team Member

Hi Tifanny,

I believe you would just have to add the TEXT formula on the outsdie of your calculation to make sure it is formated with two digits after the decimal.  Here's an example to try TEXT(${Commission__c}/100)*${Total_Price__c},"0.00") .

Hope this helps,

Anthony Lardiere Jr
Senior Customer Success Manager

View solution in original post

6 REPLIES 6

AnthonyValidity
Validity Team Member
Validity Team Member

Hi Tiffany!

What kind of field are you trying to update?  What is the name of the field?  

Regards, 

Anthony Lardiere Jr
Senior Customer Success Manager

It's a currency field. Currency(16, 2) 

I wanted to do the formula in the SFDC field itself, but we need this field to not be a formula field. So I was hoping I could get the formula done and field updated through demandtools on a schedule.

AnthonyValidity
Validity Team Member
Validity Team Member

Hi Tifanny,

I believe you would just have to add the TEXT formula on the outsdie of your calculation to make sure it is formated with two digits after the decimal.  Here's an example to try TEXT(${Commission__c}/100)*${Total_Price__c},"0.00") .

Hope this helps,

Anthony Lardiere Jr
Senior Customer Success Manager

That worked. Thanks so much!

My pleasure!  🙂

Regards,

Anthony Lardiere Jr
Senior Customer Success Manager