2 Replies Latest reply on Feb 26, 2015 8:49 AM by evolution

    Global Fields - Is this right?

    evolution

      Title

      Global Fields - Is this right?

      Post

      If I wanted to create a few global fields (for say currency exchange rates) I would create a table with the relevant fields, set them to global and can obviously pick them up when needed.

      The tricky part is setting the values up and storing them as far as I see. I have a FM13 hosted solution. In order for me to change the global field values, do I have to;

      Close the file in the Server.

      Open the file in FM Pro.

      Edit the values.

      Upload it back to the server.

      Open the file in Server?

       

      Seems a long way round to create a global value....

        • 1. Re: Global Fields - Is this right?
          philmodjunk

          It's one method that works. Here are several other options:

          Set up a table of non-global fields for this data. Set up the OnFirstWindow trigger to perform a script that copies the values from the local fields to the global fields. This script will run once each time a user accesses the file.

          Use Perform Script On Server to run a script to update the globals.

          Use a server schedule to run a script to update the globals.

          Don't use globals, set up your table of non global values to be related to  the table occurrence of each layout where you need access to these values using the Cartesian Join (X) operator instead of =.

          • 2. Re: Global Fields - Is this right?
            evolution

            Thanks, I have used the first option and it works fine, very much appreciated.