May 3, 200322 yr I would like to customize my calculations, in that, whatever I type into a text field, I would like that to be used as the calculation in another field Example, I have four fields: A_1 , A_2, B_1, C_1 I would like to enter the equation 'sum(A_1, A_2)' (or any valid FMP equation) into the C_1 field, and have the B_1 field display the result of that equation. cheers kevin
May 4, 200322 yr Author Actually I was not looking for a calculator. Here's another explanation. I would like to enter the formula 'sum(A_1, A_2)' or some other valid FMP expression such as 'GetField(A1)' into a field (text or not) and have another field perform that operation. So, instead of entering 'sum(A_1, A_2)' into the field "B_1" directly, I would like to type it into a field named "C_1" and have the "B_1" field display the result of that formula. This would give me the flexibility to change my calculation at will. I hope I was much clearer this time. thanks kevin Basically,
May 5, 200322 yr I've done a simple 4-function calculator on two fields and it turned out to be very complex, because each variation has to be hard-coded into the system. More functions and more variables will increase the cmplexity geometrically. Summary: yes it can be done, but it's gonna be a huge undertaking. Start by working out how many variables you want to work with, and the number of functions you want to support. The fewer of each the better. For example, the calc I made went something like this: Case [operator = "+", A + B, operator = "-", A - B, operator = "*", A * B, operator = "/", A / B] Increasing the function to fit three variables is significantly more work, since there are now 16 diferent permutations of functions to calculate to support the four functions... it'll be n*n for n functions. Case [operator1 = "+" and operator2 = "+", A + B + C, operator1 = "+" and operator2 = "-", A + B - C, operator1 = "-" and operator2 = "+", A - B + C, operator1 = "-" and operator2 = "+", A - B - C, ... yada yada yada...]
Create an account or sign in to comment