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.

Featured Replies

Hi there,

I've made a database template with some global fields in the header. My problem is that when the database is hosted, any data I enter into those fields is lost when the file is closed and then opened again. The simple solution (or so I thought), was to change the field from global to just a normal text field. The only thing is that now, the header will go blank whenever I select a different record (hence, I'm guessing the reason for global in the first place). Is there any way of having a global field and still be able to save the data after the database has been hosted?

Help!!!

Global fields will take on the last values that were entered into them when opened directly in FileMaker Client (not via the server)

So, you can either close the files down on the server, then open them in FileMaker Pro client and edit the values. Then they will remember those values each time the database is opened).

Or, you can script the globals to be set via a startup script.

HTH

  • Author

So there is no way to get around it once it's been hosted then?

Startup script?

You could create a "preferences" file that would contain the global data and just reference that file.

HTH, Mike

  • Author

Ooh, sounds interesting.....How would I do that?

Sorry to sound so amateur, still new at this.........

The preference file is just another database file with one record that has the fields that you originally had as globals plus a number field with a value of 1 (one). You will use this number field to establish a relationship to the main file, so you need to create a calculated field in your main file with a value of 1. Now you can create a relationship between the main file and the preference file based on those two fields.

For example in the preference file, you would have TextField1, TextField2, ... and the number field (you can call it Constant). Then populate the text fields with whatever data you wanted in the globals. You can then write a script that when the main file opens, to set the main global field to the value in the preference field. Your script would use the Set Field function to put the contents of the preference file fields into the main file globals.

Set Field["global1","Perferences::TextField1"]

Just make sure the global field type matches the field type in the preference file.

HTH, Mike

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.