6 Replies Latest reply on Apr 5, 2017 3:03 PM by FrankSalgado

    Error variable storage global

    FrankSalgado

      Good day:

      For some reason that I do not know I can not modify the values contained in global variables declared in the database, ie:

      You have several global variables distributed in several databases, assigning a value to a variable assigned as global storage modifies its contents but when closing the filemaker file 15.0.2 and when it reopens its contents it returns to the previous value, as If it had not been modified, and when adding a new variable in the database and this is declared as global storage variable, the data is captured, and when closing the file and returning it open the global variable is empty.

      Someone knows or knows about this error.

        • 1. Re: Error variable storage global
          BruceRobertson

          1. Apparently you mean global FIELDS; not variables.

          2. There is no error. This standard, intentional behavior.

          • 2. Re: Error variable storage global
            jfletch

            Yeah, Frank, Bruce is right. What you describe is normal behavior. What you didn't say, but what we know (and, really, anyone who has spent much time with FileMaker knows) is that your files were hosted on a server.

             

            Global fields (you should be clear in your mind the difference between a global field and a global variable--google it) can only be set in a non-hosted file, meaning a file that is not being opened from FileMaker Server. Global fields set on a hosted file will persist only as long as the session, and will revert to their former value on closing.

             

            To enter, alter or clear values in global fields that you would like to be there on the next login, you un-host the file, open it stand-alone, make the changes and re-host it.

             

            You should check out Chris Ippolite's Lynda.com FileMaker training. Besides being one of the nicest guys around, he is an awesome trainer. Look at all the free ones and then spend a few bucks and watch the rest. So little money for so much knowledge!

             

            Or, keep trying to figure out what questions to ask here. Bruce is one of the smartest guys you will ever meet, but his ability to read minds is not that much more acute than the next guy's. You will be amazed at the great answers he comes up with when you ask a question that is informed by actual knowledge of the subject.

            1 of 1 people found this helpful
            • 3. Re: Error variable storage global
              BruceRobertson

              jfletch - thanks for your comments and additions.

               

              However, I think we need to address one more thing.

              The more appropriate solution is not to bother with all this hosting unhosting fiddling hosting fiddling whatever business.

              The real solution is to create a single record PREF table, where for each global field, there is a corresponding standard, stored field. Usually only set up to allow editing by the admin privilege set for the file.

              You set fields in the PREF table to whatever you want to use for the global fields.

              You make sure that users cannot delete this record or create new records in this table.

               

              Then, you add some features to your startup script so that it populates the global fields based on the content of this stored data. AFAIK this is the most recommended practice.

              1 of 1 people found this helpful
              • 4. Re: Error variable storage global
                jfletch

                Totally, dude!

                 

                See, Frank? I TOLD you that if you inspired him, you'd get a really great answer!

                 

                And, again, he is very right: this is a very useful (and oft-employed) way to deal with globals in a shared solution. Then it matters not a whit what is in the Global fields, because they get set to what you want on every(one's) login.

                • 5. Re: Error variable storage global
                  FrankSalgado

                  Confusion resolved ... thank you very much to everyone. I lack a lot of practice in web services.

                  1 of 1 people found this helpful
                  • 6. Re: Error variable storage global
                    FrankSalgado

                    Jfletch has the solution, my error is that if I have a table of options for system administration, it works very well if you use it in applications, but in web Servies is not like that, only while I have the connection, the file was downloaded , Modified the contents of the field that has global storage allocated, uploaded the database in web services and resulelto problem. I need more practice in systems with Web Services. Thank you for your comments to all.