Carri Posted February 25, 2008 Posted February 25, 2008 Is there a way to prevent FM clearing my Global fields when I exit the application?
Genx Posted February 25, 2008 Posted February 25, 2008 http://faq.filemakermagazine.com/index.php/Global_fields Don't use them. Let us know the scenario, and someone will be sure to suggest a good alternative i'm sure.
IdealData Posted February 25, 2008 Posted February 25, 2008 If the globals have predefined values for start up then you could script them using the Set Field step. Set Field (global1, "PresetValue") If you want to capture and retain the current globals then use a closing script and save the current values to a record in table for this purpose. On start up you need a start script to to re-seed the globals in the reverse way.
Brian C Posted February 26, 2008 Posted February 26, 2008 (edited) Global fields are an interesting animal in FM. The newest versions of filemaker (7,8,9) allow us to use variables. In old versions of filemaker (4,5,6) , variables did not exist, so you had to use global fields instead. This is the primary reason why global fields act the way they do. If a solution is used in single user mode (files are opened locally by one user) then the state of the global field is actually stored. If a solution is hosted on a server to multiple users, the global field will reset to its default value. This means it will become empty, or it will reset to the last stored value when the file was opened in single user mode. The reason the behavior is different is because in a multi-user environment, the content of a global field can potentially be different from one user to the next. These are a few reasons (out of many) why you would use global fields: 1) to create dynamic temporary relationships by changing the content of the primary key in the global field. 2) to store graphic images for interface purposes in a separate table which allow display of the images even if a valid relationship does not exist to the table containing the graphics. (example: find mode, or situations where no records exist in the current found set) If it is important to keep what is stored in a global field on a user by user basis, you may have to store the field contents in a user table before the application quits so that you can restore them the next time the solution is opened by a specific user. Edited February 26, 2008 by Guest
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now