July 9, 200718 yr I've been stuck on this calculation for a while. I need to enter into one field the oz of an item, (the number of ounces). In a second field, I would like it to automatically calculate how many milliliters that item is. I have the actual numeric calc, but I cannot get it to work in the table. For the "ml calculation" field. . . I have put in: (oz Entry * 29.57352957) + ml Entry. I have also changed the Calulation to numeric. Any suggestions? Thanks. . . ;)
July 9, 200718 yr Author Thank you for asking, and being so quick! ml Entry is a number, usually a small decimal. There are three other fields involved: ml Calculation, oz Entry and oz Calculation. I cannot get either the oz or ml Calculations to work. The user needs to only enter one number into either the ml entry or the oz entry to have the other fields fill in.
July 9, 200718 yr Basically you need to set up a simple calculation, something like this: Oz_field Ml_field (result field) Oz_To_Ml_constant (29.57352957, global field) Ml_field = Oz_field * Oz_to_Ml Let's say that you want to change 1 oz to ml with the above set up. The user would enter 1 into Oz_field and that would get multiplied by Oz_To_Ml_constant field 1 * 29.57352957 = 29.5735296875 ml Set it up the other way around for opposite effect. If you want to use the same field and calc to do both conversions I would recommend Case statement.
July 9, 200718 yr I may be confused but why are these fields connected. the ml entry field wouldn't have to convert to ml, just to oz, correct? Imean the ml entry is the ml calc. so the oz calc field would just be ml entry / 29.57352957 and the ml calc would be oz entry * 29.57352957. Am I not understanding what you are trying to do?
July 9, 200718 yr Maybe he/she wants to do both, so a case of if could be used. Unit Unit_Entry Conversion Result Unit - regular text field, member of a value list oz and ml Unit entry - enter the number that needs to be converted Conversion - conversion constant number 29.57352957 Result - result field Calc something like this to implement both Case ( Unit = "Oz" ; Unit_Entry * Conversion ; Unit = "Ml" ; Unit_Entry / Conversion ; "") Anyways, something like that.
July 10, 200718 yr See here: http://fmforums.com/forum/showpost.php?post/165927/ and here: http://edoshin.skeletonkey.com/2006/06/linked_fields.html
July 10, 200718 yr Author Thank you all, I managed to make the calculation work using my original formula. Ironically, the calculation wasn't reading in some of the layouts, but in others it was fine.
Create an account or sign in to comment