October 1, 200520 yr Righto, im hosting a file on fm server 7, lots of globals which need to be set at startup... my question is, when im using the set field script step, do i have to be in the layout related to the field? Secondly, is there a quicker way of doing this.
October 1, 200520 yr Well, in all of my solutions I had to set it to the layout that is contained in that table. A quicker way of doing this is to make a table with all the globals, kind of like a settings table containing only one record. Then make a relationship that shows everything. That is one way, but without knowing more details of what your set up looks like, it would be hard to give a better way.
October 1, 200520 yr The "Set Field" step DOES NOT require the layout with the field on it. As the files are hosted on FMS then globals are "remembered" at there last content when the file was last opened/closed in FMP (not through a host). If you're the developer then close the files and quit FMS. Open the files individually in FMP and set the globals. Close the file. Repeat for each file. Reopen in FMS. The globals are now "fixed". Alternatively, execute a script to initialise the globals when the file is first opened by the user(s). You get more flexibility this way as you change the initial state of the globals without shutting FMS down.
October 1, 200520 yr Author so your saying that if i close down the server file... load it up on fmp, set all the globals manually then relaunch it on server, all the users will now have the current globals?
October 4, 200520 yr To set the globals you do not need to be in a layout containing the field. But globals are local, meaning that every user has their own set of globals, the server can't set them. So you may need to make the startup script launch from each users PC.
October 5, 200520 yr Author Then why are the globals i set, prior to hosting the file on server all still there?
October 5, 200520 yr Global fields will retain their values of the host file. Any other remote users will have their own set of global values set by the host file. In other words, if you have a global value set in the host file, every time a user connects to it, you will see the value of the host file. This can be usefule to store such values as your company name or images, etc. But not for stuff as username etc. Those should be set with a script and be an empty value in your original file. David Kachel had a pretty good white paper for beginners. Take a look at the thread here. White Paper
Create an account or sign in to comment