Jump to content

Global Field showing blank *sometimes*


This topic is 6176 days old. Please don't post here. Open a new topic instead.

Recommended Posts

not sure if this is a field issue or a layout issue.

I was just looking at a global field that is populated on my screen, but when I look at my co-worker's screen, the field is blank. There is only one record in the table, so even if the field weren't global, we are looking at the same record. Any ideas what this could be?

Link to comment
Share on other sites

Also the global field will contain the value that is stored in the global field at the time that file starts being served. So this means that when a user sets the global field to something else, it is for the duration of the session. Once that user closes the session and then goes back in, the global field will contain the default value once again.

Edited by Guest
Link to comment
Share on other sites

wow, i can't believe I didn't know that. Thanks!!!

So let me ask you this: what's the best way to store values that all users will have access to that will persist between sessions? And it would also be nice if users could edit these "global-esque" values somewhere if they needed to.

Link to comment
Share on other sites

The best way is to have a preferences table. You only need to have one record in this table. You can then use cartesian joins (X operator) to make use of the items in this preferences table by relating it to the other tables.

Link to comment
Share on other sites

John--

Having used preferences tables in the past, I can vouch for their utility. I know that for me the question of making this table have only ONE record was always a challenge, so I thought I'd ask you how you've managed that.

Looking forward to edification...

David

Link to comment
Share on other sites

Hi David,

I have three different tables to store things. One is a general preferences table that stores system wide shared data. The second is a user /user preferences table where certain user specific actions are stored. The third one is table where I store most of my global fields. Between these three tables, I can usually manage all spectrums of the system wide data.

What have been your issues with a one record preferences table?

Link to comment
Share on other sites

I kinda figured all this out as I was driving home. I've been using a table with one record to store settings (and that one table is related to all my other important tables), and just today I created an accounts table where I can store account settings. I was having trouble figuring out how to ensure that the user account record is also related to all the same tables, but I think I figured it out from this thread. I create a global field in my single record table, and store get(accountname) in that field, then relate to the user account record that way. Single global fields are per-user, this ensures that each user will be able to relate to their own account.

This forum is REALLY helpful!

Link to comment
Share on other sites

just when I thought I knew what I was doing, global fields are stumping me again:

I have a "resources" table with just one record, and a few fields in there set to global. What is odd is that the global fields I created months ago are retaining their values between sessions and users, but the global field I created today loses its value between sessions.

My first realization is "duh, don't use global fields, since there is just one record", which solves my immediate problem. But I'm still baffled as to why some global fields are retaining values and others are losing values.

Here's my theory, tell me if I'm right: The global fields that are retaining their values were set prior to this file being hosted by FMP server. Now that it is on the server, the database retains these field values. however, any new fields I define and populate "as a client" aren't retaining their values.

Is that it?

Edited by Guest
Link to comment
Share on other sites

Almost. Did you read the whitepaper yet?

As I stated earlier, the global field will retain the value that is stored in the global field at the time that file starts being served. Those fields can be overwritten but as soon as a new session is opened, the default value will show up. So when you added the new global fields and you want there to be a default value in them, you need to stop the files from being served, then make your modifications to the global fields / populate with default values, and then put them back on the server / starting hosting them again.

Link to comment
Share on other sites

This idea of a single-record Peferences table is that the fields in it are *not* global, and hence avoid the whole user-session problem.

If you really, really need global fields (since they can be accessed without direct relationships) then have your preferences table with normal fields, but set the globals to their desired values with a script that is always run at startup. Just remember that changes to the preferences won't take affect until each user runs the startup script again.

Link to comment
Share on other sites

Exactly. I was just following up on the OP's question regarding why the values in the new global fields he create disappear.

If it is system wide shared values that are needed, then the use of a preferences table is recommended. These fields are not global as Vaughn already said because the data needs to be stored across the board.

If there are user specific items, then a users table can be used.

Link to comment
Share on other sites

It is in my signature file.

'David Kachel's White Paper for FM Novices '

but here it is anyway http://www.foundationdbs.com/downloads.html

Link to comment
Share on other sites

This topic is 6176 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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