Jump to content

Planning for shared access


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

Recommended Posts

Hi all,

After laying out the foundation for a database, I caught myself encoding some layout interface functions into scripts and the scripts were using global variables to store the status of a layout (toggle buttons ... and the like).

... however, on second thought ... isn't this a bad idea ?

For example, if we have two users signing in as guests and one of them makes a change (presses a toggle), then the other will be seeing those layout changes happening to his screen all by magic. No ?

So, here I am, back to the drawing board trying to design (or simplify) the UI and avoid use of global variables for the UI.

Your thoughts on this ?

Link to comment
Share on other sites

You are right ! ... now, as I test this, the globals are not being affected.

Interesting !

Thank you for pointing this out.

This is a pleasant surprise, but I am also confused a little ...I thought that globals are part of the table data and the table data are (should be) visible to all.

Link to comment
Share on other sites

Globals are part of the field definitions and previous versions of FMP explained their existence differently. You can think of globals as "user" fields and they retain their values on the client computer.

Globals keep their values when the host saves the file, but clients cannot change the original values. If you wanted a global to always hold the value 1 at start-up then you would open the file as single user, set the global and then save the file. If you host the file on FMServer then every user starts with a "1" and gets their own copy.

Beware when cloning as you can easily lose the original values.

Link to comment
Share on other sites

This topic is 6474 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.