6 Replies Latest reply on May 18, 2017 11:54 AM by philmodjunk

    Values in global fields are deleted FM server 14

    FinnB

      I am using global fields in FM server 14 to store information needed for data export to external applications.

      However, field  contents are deleted every time I log off the FM server. Why does this happen and how can I store global field values permanently?

        • 1. Re: Values in global fields are deleted FM server 14
          philmodjunk

          This is standard and expected behavior for global fields in a file hosted by FileMaker Server or FileMaker Pro. This has been the case since hosting became possible. Furthermore, any changes made to the value of a global field are not visible/accessible to other users, they are like "virtual copies" of the information first found in the global field when the file is opened.

           

          You will need to store those values in non-global fields if you want them to be retained. You can set up a table in your solution specifically for that purpose. There are two ways to use such a table for this type of task:

           

          Use the Cartesian Join operator (x instead of =) in a relationship to match that single record in its own table to all records in your layout's table to make that data globally accessible. You can use multiple occurrences of this table in different parts of your relationship graph to make this data accessible wherever that access is needed.

           

          When the file opens, use a script to copy the values from such a record of non-global fields into a set of global fields and variables. Any changes to be made to these values would be made to the non-global fields and the values would not appear for other users until the next time they open the file.

           

          There are differences here and advantages/disadvantages to either approach so which option is best depends on the requirements of the task for which you want to use these values.

          1 of 1 people found this helpful
          • 2. Re: Values in global fields are deleted FM server 14
            TSPigeon

            FinnB:

             

            Thank you for your post!

             

            Global Fields are session based when hosted, so they will be empty when first opening a hosted database. You might see Global Fields: An Overview and Working with Global Fields.

             

            I'm sure others on the community will have recommendations on setting these fields upon opening the database.

             

            TSPigeon

            FileMaker, Inc.

            1 of 1 people found this helpful
            • 3. Re: Values in global fields are deleted FM server 14
              philmodjunk
              Global Fields are session based when hosted, so they will be empty when first opening a hosted database.

              That's not always the case. If a value was entered into the field before it was hosted, then that value is retained and the field will not be empty when opened on the server.

              1 of 1 people found this helpful
              • 4. Re: Values in global fields are deleted FM server 14
                FinnB

                Thanks for the answer!  Very useful.  I will set up a table to hold this information.

                • 5. Re: Values in global fields are deleted FM server 14
                  wimmmmm

                  Oh my goodness, how confusing!?!

                  Data in a (global) field is... not stored in a database? What a weird approach...

                   

                  Thanks for the update though ;-)

                  • 6. Re: Values in global fields are deleted FM server 14
                    philmodjunk

                    Not weird at all. In fact, most hosted solutions would encounter real problems with global fields if this were not the case.