Myrtle Posted July 9, 2007 Posted July 9, 2007 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. . . ;)
Myrtle Posted July 9, 2007 Author Posted July 9, 2007 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.
Anuviel Posted July 9, 2007 Posted July 9, 2007 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.
Slobey Posted July 9, 2007 Posted July 9, 2007 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?
Anuviel Posted July 9, 2007 Posted July 9, 2007 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.
comment Posted July 10, 2007 Posted July 10, 2007 See here: http://fmforums.com/forum/showpost.php?post/165927/ and here: http://edoshin.skeletonkey.com/2006/06/linked_fields.html
Myrtle Posted July 10, 2007 Author Posted July 10, 2007 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.
Recommended Posts
This topic is 6406 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