June 19, 200718 yr Hello: I have a layout with 2 global fields on it. The globals are called g_BeginDate and g_EndDate. I use these two globals for a date range of records to find. I have a find button that passes the dates from these 2 globals to local variables. I then compute the find using the local variables. I would just like to know if this is a valid may to do something like this? I guess my dilema comes from the scope of globals. In a multi-user database -- if a person changes either of those two globals does it really matter since I'm only using them as temporary holders? Dom
June 19, 200718 yr Hi Dom, First of all, I am going to assume that you are using 8 or 8.5 since you are talkng about variables. As for the scope of globals, their initial values are the data that it was storing at that time that the file started being served. They hold data for each session per each user, so basically each user has their own instance of the field. You can read more up on globals on these forums as well as the whitepaper referenced in my signature file. So you should be able to do your scripted find using the global fields and without the unnecessary variables.
June 19, 200718 yr Yes, this is a great way of using globals in 7+, though the use of variables may be unnecessary . Globals are local to the user, so even if you were using them as permament holders, it wouldn't matter, no other use would be able to change them during a session. You do say you're using FM 5 on OS 9 though which doesn't support variables. But if your profile is inaccurate, depending on the complexity of your find, the globals may be all you need. A more complex find generally lends itself to the use of variables, a simpler one to just globals.
Create an account or sign in to comment