July 26, 201312 yr Newbies I migrated from Filemaker 11 Server to 12 recently. I noticed yesterday our statistics, which are updated through a server side script that sets a couple of global fields, were not updating. I tried several things: - stop the database server, create new records locally and then starting again, reran the script but the global fields were not updated - created a new script, recreated the task, but this worked without issues in FM 11 so no luck there - google google google led me to no known issues or behavioral changes with global fields in FM 12 Running 12.0v4 server and client... Anyone has any ideas?
July 27, 201312 yr FM 12 and FM 11 handle globals being set by the server differently. You'll want a table to keep track your log in regular, non-global fields.
July 30, 201312 yr Author Newbies Thanks David. Can you elaborate a bit ? Is this documented somewhere?
August 1, 201312 yr I don't know if this change has been documented, but after seeing it floating around the forums, I tested it on my own server and it's true. When you open a file, the global fields have the value that was stored the last time the file was closed when that file was not being hosted. Global fields set by a server side script don't persist beyond that individual server session. They won't be accessible to the server if you run another scheduled scripts or to client users.
August 6, 201312 yr Author Newbies Solution I changed all the globals in our database to 1 record table as explained in following thread : http://fmforums.com/forum/topic/87308-globals-reverting-on-server/?p=401279 Server-side scripts work again because I now use "normal" fields.
August 6, 201312 yr I don't know if this change has been documented, but after seeing it floating around the forums, I tested it on my own server and it's true. When you open a file, the global fields have the value that was stored the last time the file was closed when that file was not being hosted. Global fields set by a server side script don't persist beyond that individual server session. They won't be accessible to the server if you run another scheduled scripts or to client users. David, Is this really something that changed in 12? I thought this is the way globals have always been handled. I always said "Your globals are yours and others can't see them".
September 24, 201312 yr Jerry, your globals are yours as you say, but when a file is hosted, the initial values of globals will not necessarily be empty, but rather will be whatever they were last set while in single-user mode. That hasn't changed. Now I can't remember how far back this goes, but it was discovered once we got the ability to run server-side scripts that when a server-side script set a global, that value would persist -- as though the file had been un-hosted, the global set in single-user mode, and the file re-hosted. Apparently this is no longer true in 12. I did not know that!
Create an account or sign in to comment