4 Replies Latest reply on Jun 3, 2012 4:43 PM by keywords

    Understanding Global Storage

    dloughlin

      I want to be sure I understand global storage correctly. I have a DB that is being served out by FMServer Advanced 12 on a windows server and is being accessed by users using CWP. 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. Any other access to the DB by that user (ie; accessing that global field value) will always use the value that the global field was set at when the database was opened locally on the host(using Filemaker Pro). What I am a little unsure about is if the DB is opened using Filemaker Pro, but as a shared DB on the host server (using 127.0.0.1), and the value for the global field is set that way, does that way change how the global field value looks to CWP users. I ask, because, I had a problem with there being a value in the global field for CWP users, and I thought I had set it locally to be blank, and yet it appears that it went back to the original value. It may be that I'm mistaken, and did not set it to blank, but just trying to make sure I fully understand global storage. I should add that I use the same account when opening the DB locally and when opening it as a shared DB.

       

      Dennis Loughlin

        • 1. Re: Understanding Global Storage
          Stephen Huston

          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.

          • 2. Re: Understanding Global Storage
            dloughlin

            So youy understanding is the sames as mine. Hopefully that is the way it is in fact working.

            Thanks for the response/

            • 3. Re: Understanding Global Storage

              dloughlin wrote:

               

              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.

              Hi Dennis,

               

              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.

               

              John

              • 4. Re: Understanding Global Storage
                keywords

                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.