I am trying to get a formula to determine if a price variable is calculated to be a decimal.
I haven't really been able to make any progress on this but I have to feel it's a simple function or set of functions I am unfamiliar with.
Probably the simplest way I know of determining this is by using FLOOR()
and an equality check.
FLOOR(myField__c) = myField__c
The idea here is that 5
is treated as equal to 5.00
This assumes your formula field is defined to be a checkbox type. A value of true means myField__c
looks like an integer, and a value of false means myField__c
looks like a decimal/float.
Of course, that only tells you if you could treat the current value of myField__c
as an integer without losing any information. It isn't able to tell you much about how your field was defined (i.e. how many decimal places it can hold).