I just discovered a bug in FileMaker Pro 15.0.2 (OS X 10.11.6) with the OnObjectExit script trigger. This bug was not present in FileMaker Pro 15.0.1.
We have a table called "Equipment" showing related "Assets" via a portal. This is a one-to-many relationship, very similar to an "Invoices" to "Line Items" relationship. One piece of equipment can have many assets (just like one invoice can have many line items). It's a very simple relationship. Just think Invoices to Line Items, and you'll get the idea.
The only thing unique about this relationship is that the "related line items" are sorted on the relationship graph. The relationship between these 2 tables is sorted (on the relationships graph) by a user-changeable number field in the "Assets" table called "Barcode #". Users can change this "Barcode #" field within their portal to instantly change the sort order of their line items. The "Barcode #" field always starts off blank with each new line item, waiting for the user to type in a number. If they commit the record, the portal re-sorts based on that user-changeable Barcode # field. So the sorting of the line items is controlled by a number field within the line items table.
We do NOT allow creation of related records via the relationship on the graph... we have a script which creates the new line item for them. This script goes to the Assets table (i.e. line items), creates the new line item there, then comes back to the Equipment table (i.e. Invoices) and loops through the portal until it stops on the Barcode # field of the newly-created line item.
On the newly-created line item, the user's cursor starts off by blinking in the Barcode # field. Then, the user presses the TAB key to move from the Barcode # field to all the other fields within that very same portal row. They just tab from field to field within that same portal row.
This has always worked fine until 15.0.2. The problem in 15.0.2 is triggered by the OnObjectExit script trigger:
We actually have an OnObjectExit script trigger attached to the barcode # field in the portal. The OnObjectExit script trigger evaluates the contents of the Barcode # field before letting the user tab into the next field in that portal row. If everything is fine with our evaluation, it exits the script with "True", which enables the tabbing to continue into the next related field (in the very same portal row). If everything is NOT fine with our evaluation, then it exits the script with "False", which ignores the tab that the user just pressed and keeps them in the very same related field.
The problem happens with the "True" statement. In FileMaker Pro 15.0.1, the "True" statement would enable the user to press tab and go to the next field. But in FileMaker Pro 15.0.2, the "True" statement causes a committing of the parent record, which causes our portal to re-sort all of its line items.
The end result of this is when the user presses tab, the user ends up in the next field, but they're suddenly in VERY FIRST PORTAL ROW instead of the original portal row which they were originally on.
I can send you a sample file if you would like to look at this issue further.