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.

Globals not retaining data after restarting db

Featured Replies

Hi,

I have a weird issue with some global fields.

I use a handfull of globals to store VAT percentages etc across my db files. For some reason, some globals retain the data I have entered while others are reset to _blanc_ when I shut down and restart. It is not dependant on type (text/number) or other settings (they are all the same). My application runs on FMP6 and is hosted by Server 5.5 on a Mac running OSX.

Anyone know what's going on?

NB: Yes, there are records in the db that holds the globals in question.

Jim confused.gif

Globals are local to the client machine, not part of the actual hosted file. Are you opening the files on a different machine on your network than the one you last saw the correct values?

For hosted files, it is more stable to set up a one-record "preferences" database. Make actual number and text fields and store the information in those instead of globals.

There are various ways of retrieving and using the data. I use a constant relationship (a field in the pref file containing a one, related to a calc field in the primary file that always contains a one). Scripts can pass the info back and forth across this constant relationship using globals.

Basicly, in a hosted environment it is best to think of global fields as local variables, not as places to permanently store data.

Steve Brown

  • Author

Hi,

I'm opening on the same machine. just closed the app, then re-open and the value is gone. I didn't know the global was local only, haven't had problems so far over the four machines using the hosted files. Nice thing to know. Thanks!!!

I'll have to make a seperate db then. I actually had this before using globals but found globals to work more efficiently. Apparantly there is a limit to the number of retained fields or something...

Jim

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.