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.

Getting global truly global (or some other alternative of it)

Featured Replies

Right now i'm using a file with 5 global fields in it to hold data as a counter. As we know this works great for one user, for that one session. Now how would i get that to work for multiple users over multiple sessions (just get it to keep the data).

Here's the break down now. i have a 4 file DB, and the 4th file is just the globals, just one record to so speak. How can i get it to permanently hold my counters?

Thanks

-j

Since the fourth file has just one record, I'm assuming that you're using some sort of constant relationship to access the global fields from the other files. Normal fields in that same file will be accessable in the same way and will act as "super globals" that all users share. Just make sure that that file never has more than one record and that you never delete that record.

Chuck

  • Author

quote:

Originally posted by Chuck:

Since the fourth file has just one record, I'm assuming that you're using some sort of constant relationship to access the global fields from the other files. Normal fields in that same file will be accessable in the same way and will act as "super globals" that all users share. Just make sure that that file never has more than one record and that you never delete that record.

Chuck

Thanks for the reply. Unfortunatly, there are many users and the data isn't global between them. Also when i exit out, it resets to blank. (the global fields) thanks.

Perhaps you misunderstood (or I am). I mean to use the file where you keep your globals and create regular number fields (not globals). Use a constant relationship to refer to these fields from any file. So long as there is only one record in the file, these normal number fields will act like superglobals, sharing their data between users and keeping the data between launches.

Chuck

I've never implemented this, but it might be easiest to export the counter value to the user's hard disk at the end of the process, then import it back into te global field at the start of the next process.

It would be easy to make this portable between multiple users, since the exported value lives on the local machine (no mucking around with creating a user database to store the values).

  • Author

quote:

Originally posted by Chuck:

Perhaps you misunderstood (or I am). I mean to use the file where you keep your globals and create regular number fields (not globals). Use a constant relationship to refer to these fields from any file. So long as there is only one record in the file, these normal number fields will act like superglobals, sharing their data between users and keeping the data between launches.

Chuck

How would i go about doing this. Create a record with the ID number 1 for instance, will it always hold on that one record, or do i have to "show related records" etc? thanks

In both databases create a calculation field with the calculated value 1. Use these fields to build the relationship. Now all records in both databases match each other. In this case ensure the related databse only has one record.

  • Author

quote:

Originally posted by Vaughan:

In both databases create a calculation field with the calculated value 1. Use these fields to build the relationship. Now all records in both databases match each other. In this case ensure the related databse only has one record.

Oh, so you mean in my main DB, create a cacl form that ='s 1, that's the ID number for that. Creating a matching ID in the DB holding my counter information (the only record) and that's my match? DO i need to show a related record, or can i skip it since that's the ONLY record.

Thanks

-j

Create a field in every database called Constant which is a calculation with a number result. The calculation is simply set to 1.

Create a relationship in every database to your main database using the Constant field as the match field on both sides of the relationship.

Create a number field in the main database and call it SuperGlobal. Don't make it a global number field, just a number field.

Assume that your relationships based on the Constant field to the main file are called Main_Constant. Now from any of the databases you can reference the SuperGlobal field in a calculation using Main_Constant::SuperGlobal. Any user's computer can change this field's value in this way and every other user's computer will see that value.

Ensure that the main file always has only one record.

Chuck

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.