8 Replies Latest reply on Sep 4, 2012 3:13 PM by philmodjunk

    Unable to change contents of global field in peer to peer shared file

    RonaldE.Manuel

      Title

      Unable to change contents of global field in peer to peer shared file

      Post

      We use a global field to record the date an action was last taken.  We are using FilemakerPro 11 and peer to peer sharing.  The global field is updated on the host computer but the update is not appearing for other users.

       

      We have struggled with getting our global fields to work since the beginning. What are we doing wrong?

       

       

        • 1. Re: Unable to change contents of global field in peer to peer shared file
          davidanders

          If your file is shared, only the host's changes to global field data are saved.  This means that if you add items to the global field as a client when closing the file the contents of the field will not be saved.  

          http://help.filemaker.com/app/answers/detail/a_id/5895/~/working-with-global-fields

          Working with Global Fields
          How do you define Global fields?
          Answer ID: 5895
          Last Updated: Dec 03, 2011

          Defining global fields (fields with global storage)

          A field that uses global storage contains one value that's used for all records in the file. Fields defined with global storage are also referred to as global fields.

          To define global storage options for a field: 

          1. With the database open, choose File menu > Define > Database.
          2. In the Define Database dialog box, click the Fields tab.
          3. If your database contains more than one table, select the appropriate table from the Table list. 
          4. For Field Name, type a name for the field.
          5. Click Options (or double-click the field name).
            Click the Storage tab, then select Use global storage (one value for all records). 
          6. To create a repeating field, enter a value greater than 1 for Maximum number of repetitions. 
          7. Click OK.
          8. Continue to define fields or click Done.  

          Notes: 

          You can use a global field:

          • as a fixed value in calculation formulas across all records in a file, or in conditional script steps, such as If, Else, End If, Loop, End Loop, and Exit Loop.
          • for fields that rarely need to be updated. For example, use global storage to put your company address on several layouts. You can quickly update the value in a field with global storage without having to update each layout.
          • as a match field for a relationship.

          You can use variables instead of global fields for temporary data storage

          You CAN'T use a global field to find records.
           
          If your file is shared, only the host's changes to global field data are saved.  This means that if you add items to the global field as a client when closing the file the contents of the field will not be saved.   

          • If a file is shared, some calculations that include global fields are evaluated on the host instead of on the client. The host performs the evaluation in the following situations:
            • when a find request is searching an unstored calculation field whose calculation includes a global field.
            • during a find request on a table with access privileges that restrict access to certain records, and the calculation that determines record access includes a global field.
            • the evaluation of any other record access calculation that includes a global field in order to determine whether to display related data. For example, a record access calculation to determine the rows to display in a portal or the values to display in a related value list will occur on the host if the record access calculation includes a global field.
               

          To accurately evaluate these calculations on the host, FileMaker Pro transfers all the global field values in the current table from the client to the host. If you know that certain global fields will never be used in unstored calculations or record access calculations, you can improve database performance by creating these global fields in a separate table. This will prevent unneeded global field data from being repeatedly transferred to the host.

          For more information on global fields see Global Fields: An Overview.

          • 2. Re: Unable to change contents of global field in peer to peer shared file
            RonaldE.Manuel

            Thank you, David.  I have read the documentation and it seems like changes made by the host should appear when other users open the file.  While the host's changes are saved, other users still see older data and not the current host value for the shared record.

            We don't otherwise have trouble viewing data in this file.  Any suggestions about what we might be doing wrong?

             

            Thank you!

            • 3. Re: Unable to change contents of global field in peer to peer shared file
              philmodjunk

              If other users should see the change made in the field just as soon as it is changed, then do not use a field with global storage. While a change made from the host will be retained, other users will not see the value change until they close and re-open the file.

              You might instead add a table to your solution with a single record and link any table where access to this value is needed by a relationship that uses the cartesian join operator (X).

              • 4. Re: Unable to change contents of global field in peer to peer shared file
                Sorbsbuster

                I'd suggest, Ronald, that you describe what you are trying to achieve with the global field.  It is slightly unusual to use a global field whose data you expect other users to access.  There is actually a lot of sophistication behind the absolute accuracy of what David and Phil describe.

                As Phil says, "If other users should see the change made in the field just as soon as it is changed, then do not use a field with global storage."

                • 5. Re: Unable to change contents of global field in peer to peer shared file
                  RonaldE.Manuel

                  Thank you for the helpful comments!  I will take the suggestion to place this data in a separate table.

                  I still think we have some kind of glitch or user error, since the user can't see the updated data even after both the host and the user have closed and reopened the files.

                  The data in question is just a reference date, not time sensitive.  I'm just baffled at our inability to get the new date to show up on user's computers after a couple of weeks of trying.

                   

                  Thank you for the help.

                  • 6. Re: Unable to change contents of global field in peer to peer shared file
                    philmodjunk

                    There may be some confusion as to what is meant by "Host". In a Peer to peer network set up (Where FileMaker Server is not used), the first copy of FileMaker to open the file is the "Host". All other users, the ones that use Open Remote... to find and access the file are the clients of this Host machine.

                    Changes made to a global field on the Host machine will be retained, but not those made by a client.

                    • 7. Re: Unable to change contents of global field in peer to peer shared file
                      RonaldE.Manuel

                      Okay, this is somewhat moot since I have just changed my two global fields to separate tables with a cartesian join, as you suggested (seems to be working well).    But I am bugged by the fact that the changes retained by the host computer in a global field are not viewable on the client computer.  Is that the way it's supposed to work?

                      • 8. Re: Unable to change contents of global field in peer to peer shared file
                        philmodjunk

                        Yes, but they are viewable, just not immediately. Changes made to a global field on the host computer will be visible after the client closes and reopens the file.

                        Global fields are intended to serve as "local data" in a network environment. Changes made to a global field are not visible to other users. This is done this way so that users can edit the content of these fields and their edits will not conflict with what another user is doing with these fields.

                        For example, a user's current search criteria might be stored in the global fields. If the edits from two users--either client or host could be seen by other users, then each user's attempt to put search criteria into these fields would modify the other user's data--creating conflicts and confusion.