3 Replies Latest reply on Sep 26, 2016 9:29 AM by jmfranzen

    Calculations vs scripts


      I have used filemaker and several other similar products over the past 30 years and am trying to get back into using filemaker on a full time basis. It has changed quite a bit and has many new features and expanded calculation and scripting steps.


      I am wondering if there exists a good quick reference with several examples for the many options.


      Also wondering how to decide when to use a calculation vs a script and when to set up calculations as a field, or one of the many other ways you can set them up, and same with scripts and which location to use the script triggers from.


      The project I am working on involve a DB which tracks a water utility and has to calculate gallons used each month, by subtracting new meter reading from previous month reading, and then calculate the billable dollar amount for that month.


      I originally tried to just set the gallon fields to be a calculation equal to this month minus previous month, but that doesn't work very well.

      Then I tried to write a script but couldn't figure what the steps should be and which functions to use. Also thought do I need to complicate the script by getting the name of month from current date and then only operate on the fields with the same month names.


      I am a big fan of simple and direct.

      Any suggestions on how to make this work and keep it simple at the same time?