You need to sign in to do that

Don't have an account?

Baguiar2

# Text formula field to show no decimals from # field

Hi there , I have a formula text field that reads another formula field but a number, and adds an image. My issue is that the number formula field is set with NO decimals. But, when i reference the # field in my new text formula field, all the decimals are showing. So, A1 is a formula number field with NO decimals and i'm trying this: TEXT(A1)&" - " Image(/img/green.jpg.... And so on. Is there a way to have the A1 value show as I set the field with no decimals ? Thanks! B

Navatar_DbSup

Hi,

I have tried the same and I am not getting the value with decimal value inside the 2nd formula field. Even if you are getting the decimal then use ROUND to remove the decimal.

ROUND

Description: Returns the nearest number to a number you specify, constraining the new number by a specified number of digits.

Use: ROUND(number, num_digits) and replace number with the field or expression you want rounded; replace num_digits with the number of decimal places you want to consider when rounding.

Example: ROUND (1.5, 0) = 2

ROUND (1.2345, 0) = 1

ROUND (-1.5, 0) = -2

ROUND (225.49823, 2) = 255.50

Simple Discounting

ROUND(Amount-Amount* Discount_Percent__c,2)

Use this formula to calculate the discounted amount of an opportunity rounded off to two digits. This example is a number formula field on opportunities that uses a custom percent field calledDiscount Percent.

Tips: § Enter zero for num_digits to round a number to the nearest integer.

§ Salesforce automatically rounds numbers based on the decimal places you specify. For example, a custom number field with two decimal places stores 1.50 when you enter 1.49999.

§ Salesforce uses the round half-up rounding algorithm. Half-way values are always rounded up. For example, 1.45 is rounded to 1.5. –1.45 is rounded to –1.5.

§ The decimal numbers displayed depend on the decimal places you selected when defining the field in the custom field wizard. The num_digits represents the number of digits considered when rounding.

Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved.

## All Answers

Navatar_DbSup

Hi,

I have tried the same and I am not getting the value with decimal value inside the 2nd formula field. Even if you are getting the decimal then use ROUND to remove the decimal.

ROUND

Description: Returns the nearest number to a number you specify, constraining the new number by a specified number of digits.

Use: ROUND(number, num_digits) and replace number with the field or expression you want rounded; replace num_digits with the number of decimal places you want to consider when rounding.

Example: ROUND (1.5, 0) = 2

ROUND (1.2345, 0) = 1

ROUND (-1.5, 0) = -2

ROUND (225.49823, 2) = 255.50

Simple Discounting

ROUND(Amount-Amount* Discount_Percent__c,2)

Use this formula to calculate the discounted amount of an opportunity rounded off to two digits. This example is a number formula field on opportunities that uses a custom percent field calledDiscount Percent.

Tips: § Enter zero for num_digits to round a number to the nearest integer.

§ Salesforce automatically rounds numbers based on the decimal places you specify. For example, a custom number field with two decimal places stores 1.50 when you enter 1.49999.

§ Salesforce uses the round half-up rounding algorithm. Half-way values are always rounded up. For example, 1.45 is rounded to 1.5. –1.45 is rounded to –1.5.

§ The decimal numbers displayed depend on the decimal places you selected when defining the field in the custom field wizard. The num_digits represents the number of digits considered when rounding.

Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved.

Baguiar2Thanks Navatar! Totally makes sense the ROUND, and that was really simple, but allways a good diferent pair of eyes makes a diference!