1 Reply Latest reply on Dec 20, 2013 11:53 AM by KylePutzier

    Script triggers causing an issue.


      I have a database containing 100 (or so) tables in 6 (or so) files. Recently, two (or more) tables have been having issues with the layout script triggers. When a layout script trigger fires, it closes the window. The 2 triggers showing this issue are OnRecordLoad and OnCommit. I haven't tested the rest or done enough diagnosis to determine the exact cause of the window closing. I did test the scripts that run. They work fine when ran manually. The tables also behave normally when I don't use the script triggers.


      I did some development using FMPA 13 while the files were being served via FMS 12. I don't remember using any new 13 features, but it's possible that that is the cause of these new issues.


      I have backups, so I'm not too worried about this. But I would rather just repair the existing table(s). Recovering didn't seem to help. I realize that a recovered or (seemingly) corrupted file shouldn't be trusted.


      Has anyone seen this before? Does anyone have any ideas what I might try to repair this? Maybe something like rebuilding and index to fix a Find problem, or something like that.



        • 1. Re: Script triggers causing an issue.



          I fell into the trap of assuming corruption before properly diagnosing the problem. (to my credit, I did not fully blame corruption though)


          Further research showed that a script was closing the window, BECAUSE I WAS GOING TO A RELATED RECORD, WHERE THERE WAS NONE, AND CLOSING THE WINDOW WHEN I WAS DONE!


          Bonehead mistake. In 2 separate places no less. My initial testing showed that he scripts worked fine when ran manually. Of course they did. There were related records when I tested them. When the script trigger fires, there may not be any related records. I even stepped through the scripts with the debugger when I was initially diagnosing the issue. I'm a bonehead.