PDA

View Full Version : Solved: Dynamic Equation in Compiled database



Movian
08-31-2009, 11:35 AM
Hey,
i like to make sure that my systems are as user customizable and dynamic as possible while keeping the user locked away from anything they shouldn't be touching.

It has come to my attention that some of the calculations that my system uses are... controversial and that there are alternatives that some of my users may wish to use.

For example our system automatically calculates a predicted maximum heart rate for a patient (220 - age) however i was wondering if i could store a user defined calculation as a string "(a * B) /2" for example. And then dynamically use their equation as the calculation at run time. I think i know that the answer is no but it would certainly help me out in a lot of ways!.

Movian
08-31-2009, 11:54 AM
Bah,
search first post later.

After discovering the existance of the Eval() function i think i can do what i need :)

Now i just need to figure out a way for the user to define variables within their stored calculation....

OBP
09-01-2009, 03:41 AM
Why not allow them to store them in their Table Record if they want?