January 7, 201313 yr My solution needs quite a few calculations, and sometimes they get really complex. It takes quite a lot of time to 1. Go into the Manage database 2. Find correct field 3. Go to Options >> Calculated Value 4. Make a change 5. Save and go out of Manage database 6. See if it worked this time 7 Repeat X times until the result is satisfactory Is there any way to tell the calc field to update the actual calculation from a global field? A Get() function, maybe? Something like MakeACalculationBasedOn (global_field)
January 7, 201313 yr Is there any way to tell the calc field to update the actual calculation from a global field? No, but you can eliminate the need to do this repeatedly by perfecting your calculation in the Data Viewer: http://www.filemaker.com/12help/html/fmpa_tools.24.4.html#1035402
January 7, 201313 yr Author I mean the actual calculation expression, not the result of it. I am simply wondering if there exists any technique to let the expression itself be dynamic, so that i might write functions etc in a text field that would then be automatically inserted into the calculation, as part of the calculation. Imagine table with the following fields: ID name description textField (a text field) calculationField (a calculation field) In textField, I might write something like: Left(table::name;4) & Case(notEmpty (table::description); table::description) In calculationField I would somehow (scripting or any other way) be able to make a calculation expression that was exactly what the field textField said. So I might be able to change the expression in calculationField by changing the content of textField. @ comment I knew I had read something like this somewhere Thanks
January 7, 201313 yr Solution You could also use a global text field for the expression, and a calculation field = Evaluate ( gExpression ) to show the result. But that would work correctly only in the context of the same table.
January 7, 201313 yr Author You could also use a global text field for the expression, and a calculation field = Evaluate ( gExpression ) to show the result. But that would work correctly only in the context of the same table. This seems to be what i am looking for! I will try to implement Evaluate ( "FieldToEvaluate1" ) into the calculation, and see if it works Hopefully this means that I no longer have to make extremely long Case-statements to get the info I want http://www.dwaynewright.com/filemaker-calculations/2007/9/16/filemaker-the-evaluate-function.html EXAMPLE: Let's say we have a text field named Field To Evaluate and it has within it’s expression area Left("Bobby"; 3). Evaluate (expression) is where we start and we enter the following variations in the expression area. Evaluate ( "Field To Evaluate1" ) will return Left("Bobby"; 3). Evaluate ( Field To Evaluate1 ) will return Bob.
January 7, 201313 yr Author Evaluate() is exactly what I needed, and more than I hoped for! Thank you so much Comment, you just saved me many hours of work
Create an account or sign in to comment