Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Retaining data in global fields

Featured Replies

  • Newbies

I created a database that included both global text fields and regular text fields. I placed the database onto a FileMaker Server. As I enter data (records) into both of these fields everything appears to be entering properly. I then close the database. The next time I launch the database, from the server, the data from the global text fields has disappeared. The data in the regular text fields is still there. Any explanations?

This is not a FM error. Global fields should probably be called "local variables". Globals are unique to each user/session. When you move a database to server, the globals retain the last value they had when the database was opened in single user mode on a normal version of FM. When a user opens a file hosted on server, they initially get this set of globals. If the user changes the globals and quits from FM, the globals are gone. Globals are NOT shared values as are fields in records.

If you need to store values like "last check number used", you will have to use a single records file. Also be very careful with multi-user issues when sharing common values that are used and changed. If user A gets last check number 101 prints a check and writes back 101 and user B is doing the same thing at the same time, you may print two check 101's. Protecting against these types of locking issues is up to the designer.

-bd

  • Author
  • Newbies

Thanks for the quick reply. However, if I can't use a global field with a FileMaker Server, what would be the best solution to share the data for all of my records?

I'm not sure what part to explain, but here goes:

1) Create a separate file and call it "Preferences".

2) Create fields in this file for values you need to store. For example, one field could be "LocalTaxRate".

3) Maker sure there is only one record in this file, you probably only have one local tax rate! Use passwords to disable the ability to create or delete records.

4) Create a field called "Constant" (I personally use "iOne" as a cute name) define the field as:

Constant (calculation, number, indexed) = 1

5) Create the field Constant, defined in the same way in all of your files.

6) Create a relationship between and file that has common values to store and the Preferences file by creating a relationship with Constant <---> Constant.

7) Use this relationship to access fields in the Preferences file.

Better?

-bd

Store the values within a common file in regular fields. Ideally this file should contain only 1 record, and should only be used for this kind of storage. This is a classic "Preferences" file.

  • Author
  • Newbies

Could you explain in more detail what you mean?

  • Author
  • Newbies

I'll try it ..... thanks!

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.