September 19, 201411 yr Hi there, I have a bit of a challenging issue. A few days ago all server side scripts stopped working in our file. We have about half a dozen user triggered server side scripts and they all suddenly stopped working. When they are executed the scripts hangs and I have to restart filemaker. Here is what I have tested so far: Created a new table, with 1 field: timestamp created a new server side script that does the following: Goes to the layout Creates a new record set field timestamp with the current timestamp Commits the record the result of running this is that FM13 hangs - no new record created. The Next thing I did was to create a completely new file with a different name, create the same table and field, imported the script, uploaded it to the server and tried running the server side script in the new file and it worked - so server issue is ruled out. Next, I download the problem file - Performed a recovery, cloned it, re-upload the cloned version with 0 records and tried the script again - FM hung again - so the issue seems file specific. Next I tested the same script running locally on problem file - it worked. so the issue only seems to occur in the problem file when running on the server - the script will run perfectly when the problem file is run local and it runs perfectly when duplicated in another file on the server. Is there some setting that I or someone else may have changed that could be stopping the script from running on the server in this file? At a loss for what to try next... I have 37 tables, heaps of scripts and around 10,000 plus records that I would have to recreate if I had to start from scratch, so really would like to fix my existing file... Any suggestions?
September 19, 201411 yr Author Hi there, Ok I found the issue, I have a script that runs the first time a file is opened that requires user input - it seems for some reason this is also triggered everytime I execute PSOS any suggestions on how to skip this script step? I have tried using get (systemplatform) within an "if" statement but that doesn't seem to work. Any suggestions on how I can avoid running the start up script when executing PSOS? Mark
September 19, 201411 yr Get(applicationversion) will contain the word "server" in it for both server-side script schedules and PSoS sessions. The OnOpen scripts will run in both scenarios so you have to branch around server-incompatible steps.
September 21, 201411 yr Author Thanks Wim, I used a custom function I found on a site called IsRunningOnServer which returns 1 when running on server. PatternCount ( Get ( ApplicationVersion ) ; "Server" ) As you suggested I'm using that to skip any server incompatible steps. Thanks for the suggestion. This seems to have solved the problems.
Create an account or sign in to comment