1 Reply Latest reply on Sep 8, 2014 5:41 AM by TSGal

    Problems with Global Variables

    ssnodgra

      Summary

      Problems with Global Variables

      Product

      FileMaker Pro

      Version

      12.4

      Operating system version

      Windows 7

      Description of the issue

      I need some assistance with two problems.  I am not using Filemaker Pro Server.  I have Filemaker Pro 12 loaded on a workstation and share it out to 5 other users as clients.  Once the program is started on the main workstation, it is normally not restarted unless there is a system problem or a change to the program(s).  I am not using the serial function for the counters.
        I am using two Global variables as counters.  I set up two scripts to reset the counters.   Each was run on a client’s workstations and therefore the global counters were reset only on the workstation of whoever fired off the script.  Is the only way to get these scripts to work properly is to have all users logout , run the scripts on the main workstation and then have the users login again?
      Second problem
      I am using another Global variable to save the month.  When the month changes I want to execute a script to reset a counter back to zero.  Again the problem arises that the global variable does not change for everyone.  Since I do not always reboot the main workstation, where can I put this scrip so that it will change the counter back to zero on the first of the month for all users?

      Exact text of any error message(s) that appear

      No errors.

      Workaround

      Set up another file with a single record to house variables.

        • 1. Re: Problems with Global Variables
          TSGal

          talisman:

          From page 100 of the FileMaker Pro 13 Help (http://fmhelp.filemaker.com/docs/13/en/fmp13_help.pdf):

          "In networked databases, global field changes made by a guest are available only to that guest, and only until the guest closes the file. Each guest can have a different global field value. If all guests must have the same value, define a calculation field with a constant value (in quotes)."

          And on page 184:

          "If your file is shared, only the host's changes to global field data are saved. Changes are saved only when the file is closed."

          Or, as you have discovered, create another file with one record that contains the variables with the default values.

          TSGal
          FileMaker, Inc.