2 Replies Latest reply on Oct 1, 2013 8:19 AM by DLarsen

    Global Storage/Users

    Jason_Farnsworth

      I am working with a global field in which I use to store a Serial Number. It appears to empty out that value as the database gets logged out of.

       

      The question is… Are global fields (data contained within) different for each user? Could one user have a different set of global fields (data contained within) than another?

       

      What would be a better way to keep this serial number active as the database is logged by multiple users.

       

      I know that I can set up a serial number within the field setup and I do this, however I manipulate this number over time via scripts. Within the script I will set a new number example.

       

      Normal Progression 1000.0, 1001.0, 1002.0, 1003.0, etc,

      Altered Progression 1000.0, 1001.1, 1001.2, 1001.3, 1002.0 1003.0, 1003.1

       

      I have a main document which is the whole number progressions, I can have a revised document of the original which accepts the whole number progression, and starts ticking in increments of .1

       

      Any thoughts would be appreciated,

       

      Jason Farnsworth

      Midland, Tx

        • 1. Re: Global Storage/Users
          Mike_Mitchell

          Jason -

           

          To answer your basic question, yes, each user gets his own set of global values. They are not preserved once the user logs out. To preserve a user's values, the normal method is a Users or Sessions table. This is done by account name and allows you to store each user's values upon logout.

           

          Now, with regard to a serial number, you can do what you're asking using a common table with a single record. However, be careful to trap errors in case more than one user attempts to access the record at the same time. You can wind up with a mess if that happens. Another method would be to record each user's value in his Users record and then use the maximum value entered during that day, updating it with a batch script at night. Your use of FileMaker's auto-enter serial capabilities to manage such a system may, in fact, be the best option (due to its intrinsically multi-user safe nature).

           

          HTH

           

          Mike

          • 2. Re: Global Storage/Users
            DLarsen

            Jason,

             

            Here's a whitepaper for folks who are new to Filemaker. It's been a few years since I've read it but there is some good stuff.  The very first topic is global fields.

             

            http://www.foundationdbs.com/Downloads/WhitePaperForFMPNovices.pdf