Do you specify a starting layout in File Options? Might that layout be the one with the OnLayoutEnter trigger?
If you enable the script triggers, but temporarily disable the start up script, is the trigger tripped?
No starting layout was specified in the file options. That was my first thought.
As suggested, I have disabled the OnWindowOpen & OnWindowClose Scripts. I have set the file option switch to layout on opening `to my list` and enabled the OnLayoutEnter triggers.
This works without error.
Hmmm, by any chance was the layout with the trigger the current layout, the last time this file was closed? (On a network, this would be the last time that the file was closed on a FileMaker Pro host.)
I`ve utilised a closeout script, which returned the file to the layout list before closing the file. Again, that was debugged to ensure it was working.
The file is hosted , but I am getting the same issue on a local version.
These are my startup and trigger scripts along with my layouts
That bottom script looks to me like a script to be performed by the OnRecordLoad trigger instead of OnLayoutEnter unless test type is a global field.
I have reinstated the startup & closeout scripts and the layout trigger scripts. Everything seems to be working fine and it appears to be one of those unexplainables....
I will follow your advice and utilise the OnRecordLoad Command
I'm basing that comment on very limited information. My assumption here is that each record specifies one of the two layouts. By using OnRecordLoad instead of OnLayoutEnter, each time you change records, the script can change layouts, if needed to display the record on the specified layout. That may or may not be what you had in mind for this.
Its a very simple system, with very few user functions. For example, users can`t scroll through records. They access records from the list and this locks every thing else out.
In this instance, having weighed the options, I think on record load provides a more robust solution