Mike J Posted February 20, 2008 Posted February 20, 2008 I have four tables. Compounds Treatments Treatments_Compounds Join Weight The weight record is a related weight (grams). Treatments is just a table that records the event Compounds have information about them including the appropriate formula that has one variable that needs replaced, current weight. An example is x/20*100 were i need to replace x. I tried the Let fx but couldn't get a number result. Can anyone help Thanks M
comment Posted February 20, 2008 Posted February 20, 2008 This is not very clear. If the formula is text to begin with, replacing "x" with another value will result in a new text string. You can then use the Evaluate() function to get the result of the formula - provided it's valid Filemaker syntax.
Mike J Posted February 20, 2008 Author Posted February 20, 2008 Sorry Comment, Let me try again I weigh a subject to get the current weight so I can apply a correct dose. Right now I have to figure out the basic calc on paper so the user has to multiply the weight by some final number. What I would like is for the user to insert the formula X= Current Weight X*((50/100)/1000)^2 How can I get this to result in a number rather than just the text. Note...all are number fields. Is this wrong? Units are applied later using a separate field.
mr_vodka Posted February 20, 2008 Posted February 20, 2008 Why dont you have two fields for your formula. weight and formula. Weight will be a number and formula will be text. Your users will type in the weight amount and the formula that they want to use at that time. Then the calc with num result could be weight * Evaluate ( formula )
comment Posted February 20, 2008 Posted February 20, 2008 Or: Evaluate ( Substitute ( Formula ; "x" ; Weight ) ) The user inputs the measured weight into the Weight field (Number), and the formula into the Formula field (must be Text). The result of the calculation can be a Number.
Recommended Posts
This topic is 6122 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