Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 6122 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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

Posted

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.

Posted

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.

Posted

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 )

Posted

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.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.