2 Replies Latest reply on May 27, 2015 11:29 AM by binu.alexander

    Global fields to store exchage rates .... need help

    binu.alexander

      I am using a table called t_Exchange_rates to store   fields called USD , GBP , EUR , AUD and CHF ... exchange rates .

       

      The user is able to go and update rates whenever needed .

       

      But the exchange rates entered disappear each time I log out of the database and login . The database is on FM Server 14

       

      How can I set the value of global values to be saved even when I log out  ?

        • 1. Re: Global fields to store exchage rates .... need help
          Mike_Mitchell

          Global fields retain the last value they held when the database was last closed on a local client. Those values are restored each time a new client opens the database. Hence, you have three options:

           

          1) Close the database on the server, open it locally using Pro / Advanced. Set the fields, then rehost.

           

          2) Create a set of parallel "normal" (non-global) fields. Use scripting to set the globals whenever someone opens the database to the values in the non-global fields.

           

          3) Use scripting to set the values directly (store the defaults in the script instead of in fields).

           

          Advantage of option 2: You can change the defaults merely by changing data in a table. 1 requires shutting down the database; 3 requires a code change. 2 does carry extra schema load.

           

          Each choice therefore carries different benefits / costs.

           

          Mike

          • 2. Re: Global fields to store exchage rates .... need help
            binu.alexander

            Thanks Mike,

            I used method 2 ... It's working well !