Heres Trouble Posted February 4, 2009 Posted February 4, 2009 Hi All, I have an ingredient quantity field in my recipe database in which I typed numbers as I wanted to see them, ie all quantities less than 1 were prefixed by "0.", and non-whole quantities above "0" used either 1 or 2 decimal places, for instance "0.25", 0.33, 0.5, 0.75 - this is the easiest on the eye for my application. However, because I've now made the field a calculation field (so I can expand or reduce the number of serves), Filemaker wants to give me 2 decimal places everywhere. Does anyone know how to fix this? Thanks in advance for any help! Helen
bcooney Posted February 4, 2009 Posted February 4, 2009 Your ingredient quantity shouldn't be a calc field. You need another calc field, TotalQty = Serves * Ingredient Qty. Right? Anyway, either use the Round() function to avoid decimal places or use Format>Number in layout mode to only show n decimal places.
Heres Trouble Posted February 5, 2009 Author Posted February 5, 2009 Hi Bcooney and thanks, but you seem to have misunderstood what I require. I might have a recipe that serves four people that I typed as 2 cups flour 1.5 cups basil. When I decide to cook for two people, I want the quantity field (calculation NumberofServesNew / NumberofServes * IQuantity) to show decimal places only when not zero, and always show leading zero when less than one. 1 cup flour 0.75 cup basil
comment Posted February 5, 2009 Posted February 5, 2009 Format the field as decimal. Deselect the 'Fixed number of decimal digits' option.
Heres Trouble Posted February 5, 2009 Author Posted February 5, 2009 Hi 'Comment' and thanks so much, how could I not have tried that! You people on this forum rock.
Triple Posted February 20, 2009 Posted February 20, 2009 I have a related problem with a calculation that I am using, but instead of always showing a zero, I want to never show the zero left of the decimal. i.e. I have an average that I want to appear as .420 and not 0.420. Any suggestions? Thanks
Recommended Posts
This topic is 5814 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now