When opened with FMPro, global values (other than calculations) are retained:
- Only for the duration of that user's session if the file is hosted
- As the default values when next opened by any user if the global was edited while opened locally by a single user.
This means that any values you left in place when it was last closed as a local user, unhosted, will be the default values for all users in a hosted environment, until changes are made by a user for the duration of their session. When they close it hosted and reopen it hosted, those defaults will return without regard for any edits of globals in a previous hosted session.
So youy understanding is the sames as mine. Hopefully that is the way it is in fact working.
Thanks for the response/
Any change to a global field by that user (thru a script initiation) will only be in effect while that script is running. I believe I have that part correct and that seems be be working correctly.
Stephen didn't seem to address this part of your question and I'm not sure of the answer either when your script is called via CWP -- especialy if the CWP session had other actions which went beyond that script.
If, however, the script in question also defines your CWP session then I think you are correct but that seems like a special case where the global field's value has exactly the same scope as a script variable -- which you might as well use.
No doubt we'll get a definitive answer from someone with CWP chops.
As I understand it, the most reliable way to control globals is to set their values in a script which is initiated whenever the file is opened, to whatever initial values you want them to contain. If you use this approach it wont matter what access users use to open the file, as long as the script runs. This also allows you to set global values differentially according to other criteria (eg. access privileges) if you wish.