February 4, 200916 yr 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
February 4, 200916 yr 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.
February 5, 200916 yr Author 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
February 5, 200916 yr Format the field as decimal. Deselect the 'Fixed number of decimal digits' option.
February 5, 200916 yr Author Hi 'Comment' and thanks so much, how could I not have tried that! You people on this forum rock.
February 20, 200916 yr 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
Create an account or sign in to comment