+ Start a Discussion
GailGail 

mod formula issue - different results in report vs page layout (page layout is wrong)

I have a formula (MOD(RollUp_Currency_Field__c, 3)) to determine if something is divisible by 3 (i.e. it will return 0 if divisible by 3). On a record, the amount is 45K. In a report, the formula field correctly returns 0. on the record page, it displays as 3.000. That is just plain wrong so I think this is a bug (especially since the same field is reporting different results on a report vs a page layout). I'm also wondering if it has anything to do with currency conversion (shouldn't as the amount field should store a number only and when I changed the currency of my report, it didn't change the value) or using roll-up fields in the MOD formula?

I have opened a case with Salesforce but we all know how helpful that can be. Has anyone run into this in the past?
Best Answer chosen by Gail
GailGail
Thanks for the info on when formula fields are calculated - did not know that. I contacted support who at first said it was calculating based on our base currency (USD) which didn't explain why it was showing correctly on the report. They went away for a couple of days and then came back to let me know it was working as expected now so sounds like they fixed a bug. I know in workflow amount doesn't convert, having had to write workflow that looks at amount over X and having to either create a field that converts via a trigger or put various stipulations in the rule such as if(or(and(currency=usd, amount=1000),and(currency=eur,amount=2500))

All Answers

Ashish_SFDCAshish_SFDC
Hi Gail, 


Formula fields are calculated when the page is loaded or on the layout or when the Report is RUN - they are not static but Dynamic values. 

I believe the currency is getting converted and then looking for MOD function. 

Try without converting the currency and see if it shows the same value for layout and report. 


Regards,
Ashish


GailGail
Thanks for the info on when formula fields are calculated - did not know that. I contacted support who at first said it was calculating based on our base currency (USD) which didn't explain why it was showing correctly on the report. They went away for a couple of days and then came back to let me know it was working as expected now so sounds like they fixed a bug. I know in workflow amount doesn't convert, having had to write workflow that looks at amount over X and having to either create a field that converts via a trigger or put various stipulations in the rule such as if(or(and(currency=usd, amount=1000),and(currency=eur,amount=2500))
This was selected as the best answer