You need to sign in to do that
Don't have an account?
Tracy Oden 10
Custom formula field receives error when a value is left blank.
I am receing a #Error in many of my formula fields that were working properly for moths until the last two days. I then received a bunch of unknow field update errors. I deactivated the workflow, now I am getting errors on formula fields when one of the fields referenced in the formula is left blank. As stated this was not happening before. I have many fields that this is happening to. I tested the formula and treid both 'Blank field handling options'. Can someone help?
If you still get #Error then you have to go the formula referenced in this formula field and fix those field. Basically you have to fix stuff from bottom to top. (Referenced Formula fields first and then top formula fields which use refereced formula result in them).
I hope this would help.
All Answers
You are facing Division by zero error in your formula that is why it shows like #Error in formula fields. In your formula there should be logic that devides some value with zero. You can avoid by this error if you check division value is zero or null or blank then don't devide and default some values in your formula or change its value to 1 and then devide.
if you post your formula logic then I can help more.
Thanks for your response. I have many formula fields on various records. Many of which now have this error. I don't understand how after nearly 6 months these formulas worked without a hitch only to have them no longer work starting two days ago. Here is an eoample of one of them:
Productivity_Benefits_Forecast__r.Promotions_Revenue_Forecast__r.Avg_Daily_Purchasing_Clients__c + Productivity_Benefits_Forecast__r.Promotions_Revenue_Forecast__r.Avg_Daily_Purchasing_Clients_Radio__c + Productivity_Benefits_Forecast__r.Promotions_Revenue_Forecast__r.Avg_Daily_Purchasing_Clients_Print__c + Productivity_Benefits_Forecast__r.Promotions_Revenue_Forecast__r.Avg_Daily_Purchasing_Clients_Web__c+ Productivity_Benefits_Forecast__r.Promotions_Revenue_Forecast__r.Avg_Daily_Purchasing_Clients_TE__c+ Productivity_Benefits_Forecast__r.Promotions_Revenue_Forecast__r.Avg_Daily_Purchasing_Clients_PR__c+ Productivity_Benefits_Forecast__r.Promotions_Revenue_Forecast__r.Avg_Daily_Purchasing_Clients_WP__c+ Productivity_Benefits_Forecast__r.Promotions_Revenue_Forecast__r.Avg_Daily_Purchasing_Clients_VM__c
If one of the fields referenced above is blank, I get the #Error! message in the field rather than the results. Thanks in advance for your help!
After looking at your formula I thought this could also cause #Error in your formula result. You should check in your formula field what the blank field handling setting is. My guess is, it has been selected "Treat blank fields as blanks" you should change it to "Treat blank fields as zeroes" and see if this resolves your issue.
Can you try this.
Thanks,
pRAMODH.
Hi Tracy,
Are these Avg_Daily_Purchasing_Clients__c, Avg_Daily_Purchasing_Clients_Radio__c, Avg_Daily_Purchasing_Clients_Print__c ...and all others
fields on Promotions Revenue Forecast object formula fields?
if yes then you should fix those first (they should be facing Division by zero error) or show me what's the formula for these fields?
Can you give me an example of a Division by zero formula.
Here is the Solved Answer: https://developer.salesforce.com/forums/?id=906F00000008wx6IAA
I recommend you should go to each of these Avg_Daily_Purchasing_Clients__c, Avg_Daily_Purchasing_Clients_Radio__c,
Avg_Daily_Purchasing_Clients_Print__c.....and all other formula fields and make sure you are not dividing anything with Zero Result.
Total_In_Promotion_Purchasing_Clients_TE__c / Total_Promotion_Operating_Days_TE__c
The above formula is returning an error because it is a division by zero formula (apparently). To correct this formula, I worte the the following but it doesn't seem to be working:
IF(AND(Total_In_Promotion_Purchasing_Clients_TE__c , Total_Promotion_Operating_Days_TE__c <> 0.00),(Total_In_Promotion_Purchasing_Clients_TE__c / Total_Promotion_Operating_Days_TE__c),NULL)
Got an error message: Incorrect parameter type for AND (), expected Boolean, received Number.
Can someone help me write a IF statement for the formula above so as not to return a division by zero errror.
Error: Invalid Data.
Review all error messages below to correct your data.
Formula(s) that reference this field are no longer valid: Compiled formula is too big to execute (5,208 characters). Maximum size is 5,000 characters (Related field: Formula)
(see screenshot)
This was the formula:
IF(Total_In_Promotion_Purchasing_Clients_W__c = 0, 0, Total_In_Promotion_Purchasing_Clients_W__c / Total_Promotion_Operating_Days_Web__c)
The fields are now all working on one object. Thanks for your help.
As I said, whatever happened almost a week ago (I think it is on the SFDC side related to the Lightingin experience upgrades); I now have these problems.
I am now working on a new formula. I hope you can help. It may fix for this entire object as well. I am not very good at writing IF formula's yet. The original is:
Driving_Distance_Round_Trip_miles__c / Miles_per_gallon__c * Gas_Price_per_gallon__c * Commute_Days_Per_Week__c * 52 * Avg_Number_Practioners_Local_Commute__c
I need an IF formula to circumvent the divide by zero issue as well.
Can you or someone help again. Your help is immeasureable as I had so many objects and fields to fix. I hope this will close out this object.
If you still get #Error then you have to go the formula referenced in this formula field and fix those field. Basically you have to fix stuff from bottom to top. (Referenced Formula fields first and then top formula fields which use refereced formula result in them).
I hope this would help.