2 Replies Latest reply on Jul 23, 2017 3:50 PM by philmodjunk

    Filemaker: Incorrect summaries and Script triggers fail

    louk

      1. I have a field that updates correctly from a related field. But the Summary field that is supposed to Total it does not.

       

      2. I did a workaround by adding a local script to scroll through the found set to add up this field. I added an OnObjectSave script trigger to the related field. It appeared to work at first, but it has stopped. I reopened the files. It appeared to work once, then it appeared to be using the value previously in the field, and then it stopped responding at all.

       

      To test, I added a button in the related file to run the local script, the same script as the script trigger. The button works just fine, it's the Script trigger that does not. Then there's this: When trying OnObjectExit, the trigger worked only after going to another record in the related file and exiting that record's field. Then that stopped.

       

      The only way I have any confidence in this Filemaker file now is to manually click a run button. Not what I had in mind. I wanted the local Summary field to Total. It doesn't. Then I wanted the local script to run when the related field was saved. It doesn't.

       

      There is no warning, no dialog that anything I'm doing is not permitted. Neither the Summary field nor the Script Trigger work and Filemaker displays incorrect totals.

       

      Any ideas?

       

      Thanks.

       

      FM 15.0.3.305

      Mac 10.12.5

        • 1. Re: Filemaker: Incorrect summaries and Script triggers fail
          SteveMartino

          Did you try either/or committing the record, and refreshing the window.  Short of that, can yo post a sample file?

          • 2. Re: Filemaker: Incorrect summaries and Script triggers fail
            philmodjunk

            You appear to have encountered two different problems--a script trigger that is failing to perform a script and a summary field that isn't calculating the value you expect.

             

            Are you using FileMaker Pro or FileMaker Go? I have seen a few reports of trigger issues in Go that were resolved by by restarting the iOS device.

             

            For summary fields, the total that you get depends on:

            context

            relationships

            sort order

            portal filter

             

            So you'd need to describe how you attempted to set up your summary field in some detail before we can determine whether there might be some detail not quite right in how you are attempting to use this field.