March 28, 200421 yr I stuck a dozen global text fields in a db being served. I put some test data into them while working on a script. Now, no matter what I do, every time this database is opened, on any machine on any platform (even the same machine twice in a row), my test data is back in the globals. I even made a little script to clear these globals I manually invoke every time I open it. If this wasn't temporary, I'd put this script as the startup script. I understand the local nature of globals on a served file, and now know that getting this job done is better with a one-record preferences file across a constant relationship (so the data goes into "real" fields that look and act like globals in the main db). Ultimately these globals will not be used at all on the served version, but in a runtime version. So, before I kill my globals and replace them with real fields, just out of curiosity, is there any way to *truly* clear global fields in a served environment? Steve Brown
March 28, 200421 yr Globals will remember the last entered information when they were opened locally as a single user. Then, whenever opened on a multi-user environment those globals will revert to the last information when single user. To kill them in a served environment take the hosted files down and open them locally as single user and clear out the information. Close the files down and re-open them in your server and voila, the data should be gone.
March 28, 200421 yr Or, make a startup script and add a step that sets them to the desired value. (This is easier to implement.)
March 29, 200421 yr Vaughan - Didn't Steve state that is what he currently does or am I losing it on a Sunday! I just wanted to state why they remain the same each time the file is opened when served.
March 29, 200421 yr Andy -- you don't expect me to actually *read* the posts do you? Much faster to just jump in, say something stupid then apologise later. That's always been my experience anyway.
March 29, 200421 yr Dumb question: are you actually Clear()ing the globals or are you Set Field[]ing them? Version: v5.x Platform: Windows 2000
March 29, 200421 yr Author Actually, I have a little cleanup script I made that SetFields them (SetsField?) to "" I run this whenever the globals hove into view. I had been toying with including these steps on my startup script, but hadn't yet done so. This is a temporary thing and the globals are visible on a layout that only I use, so it's a minor irritation. The Right Thing To Do would be Andy's suggestion of taking the files off the server, opening & clearing, then putting them back. But that's a lot of work. 500 meg of files that can't be taken down during working hours. I'd have to be late for dinner! But thanks for the clearer picture of how these pesky things operate. Steve Brown
April 3, 200421 yr You don't have to close FMServer, just open the define fields, which requires all but one client to close the file, clear the globals, tell the clients to reopen the file and go home for dinner.
Create an account or sign in to comment