If the file is hosted and the field was blank prior to you hosting it, the default behavior will be to revert the field to being blank, even if you change it's value.
Hmm. Well it is a hosted file. And, well it might have been blank before I uploaded it. But my users are connecting to this file and making changes to data.. - wouldnt the changes they make to the file be saved when they are committed? I am basically acting like a user here - logging into the file and changing the data in a field.
Global fields on a hosted solution are session based. They can be populated for a user during the time they are logged in via FileMaker client. Once they close the FileMaker File the values will revert to the onces they had prior to the file being hosted. The only data that would be save would be to fields that are not of type Global.
Ah that explains it - I guess I assumed that global fields, since they only allow one value, would retain the last value inputted. Never thought that they just would revert after the user disconnected. But that does make sense.
Very good info to know! Next time I will set it before I upload
Thanks for teaching me something today.
If you download the file from server and set the values you want, once it is rehosted it will retain them. Be sure that you need to be using globals for the data you need for logged in user. $$vars are very powerful for storing session information about and for logged in users.
I'm glad I was able to help. You are welcome. - Joe
The lesson to learn is that this is not what globals are for.
Forget using globals as preferences or defaults or relying on server voodoo.
Create a real preference table and store the value there. You can use a startup script to push data into a global field if that is important.
Every time a user connects, they get their own instance of a global field.
Good feedback Bruce, thanks.