6 Replies Latest reply on Feb 12, 2009 7:03 PM by Pindy

    Global fields not updating on FM Server v9

    Pindy

      Title

      Global fields not updating on FM Server v9

      Post

      I have a set of global text fields in a FMP 10 database which, now that the DB is on a FM server (v9 then v10), won't update. I have heard Server handles globals differently.

       

      When we close and re-open, the globals are back to the way the were previously.

       

      Any ideas?

        • 1. Re: Global fields not updating on FM Server v9
          TSGal

          Pindy:

           

          Thank you for your post.

           

          Global fields act differently with guests.  They are active only for that guest session.

           

          Maybe this will help...  Imagine User A sets a global field to a value "A".  User A may then use this value in a calculation or a script.  During that time, User B comes in and set the global field to a value "B".  User A would not see the value change and may wonder why the value "B" is now appearing.  This is the main reason why the value for each guest is valid for that session.

           

          Since FileMaker Server is hosting the file, the contents of the global fields will remain constant until the file is closed, reopened on a local machine and the values changed.

           

          One possibility is to create a table with a field to replace the global field.  That is, have a startup script that has a "Set Field" step that grabs the value from the external table and places it in the Global field.  At any time, you can replace the value in the external table, so when the next person logs on, the global field is set for their session.  Does that make sense?

           

          TSGal

          FileMaker, Inc. 

          • 2. Re: Global fields not updating on FM Server v9
            davidhead
              

            When accessing a database as a guest, globals behave as you have described.

             

            If you want to set default values for the globals, you have a few options:

             

            1. Take the files off the server, open them, set the globals, re-host the files. Those values then become the default for anyone opening the database as a guest.

             

            2. Set the globals in an opening script.

             

            3. Use an undocumented feature - set the global values as the only guest, open the Manage Database dialog, then close it. Default global values are set.

             

            4. Use a 'globals table' where you have one record with standard fields and a corresponding calculation field for each that is stored as a global. For example, you would have a text field called CompanyName and a calculation called CompanyNameGlobal which = Companyname.

             

            So take your pick! 

            • 3. Re: Global fields not updating on FM Server v9
              Pindy
                

              4. Use a 'globals table' where you have one record with standard fields and a corresponding calculation field for each that is stored as a global. For example, you would have a text field called CompanyName and a calculation called CompanyNameGlobal which = Companyname.

               


              • 4. Re: Global fields not updating on FM Server v9
                Pindy
                   I'm also unsure how to RELATE my versions table to my main table.
                • 5. Re: Global fields not updating on FM Server v9
                  Pindy
                    

                  Here's what I tried:

                   

                  Made a preferences table where I want to enter my global data:

                   

                   

                   

                  Then I related the 10 fields to each of their corresponding Global fields in the primary table:

                   

                   

                   

                  Then I changed the global fields in my primary table to the following, per David's suggestion:

                   

                   

                  But the global fields still show blanks. Again, I appreciate your expertise. 

                  • 6. Re: Global fields not updating on FM Server v9
                    Pindy
                      

                    That didn't work, so my solution was to cross-relate (x) two of the fields between the preferences table and the primary table and made a script—which worked. I made a button on the layout where you enter the global info that when clicked, ran the script then took you back to the primary layout, so your changes are reflected instantly.

                     

                    Boy, what a workout. Now I need to make it pretty.

                     

                    Thanks again.