Johnny5 Posted March 26, 2007 Posted March 26, 2007 (edited) Hi. Do calculations that are referencing global fields still give user specific data? If there was a calculation field with gUserName and gUserName was a global field with that was set with the user's name what would that result be? What about global calculations? Edited March 26, 2007 by Guest
Genx Posted March 26, 2007 Posted March 26, 2007 Huh? A global is session specific, it will retain whatever value you give it until the session expires (i.e. the user closes their connection to a server). Calculations that are referencing global fields give whatever data is stored in the global field... But an unstored calculation field will also give user specific data i.e. Get(AccountName) in an unstored calculation field will be different for everyone.
Johnny5 Posted March 26, 2007 Author Posted March 26, 2007 Sorry. I may have given a bad example. Lets say there is a global field to which each user has set to the records he has chosen. James 1 10 13 Cory 3 10 25 Will a calculation field referencing the global field still result user specific data? When do we use global calculations?
Genx Posted March 26, 2007 Posted March 26, 2007 Well yes, but only because the global is user specific... i.e. if the global field has the value "x" for user a and the value "y" for user b... Well, it still has the value "x" for user a when you reference it in a calculation because your just pulling whatever value exists for that user.
Johnny5 Posted March 26, 2007 Author Posted March 26, 2007 Thanks for the quick reply. So what is the benefit of global calculations then? Why wouldn't we just use unstored calculations?
Genx Posted March 26, 2007 Posted March 26, 2007 Hold on a sec, just to re-iterate Unstored calculations evaluate when needed -- which is when the screen refreshes, during searches etc.. If you reference a global field, it's just going to return whatever is in that field... they won't return a session specific result unless you reference a global field. Global calculations can be referenced from any point within the database... unstored calcs cant.. Global calcs are global over a record set... unstored calcs may use a global value as a base value and manipulate that value using record level info (i.e. Global contains: "image:/c:/files/" and the records could contain image names to return image:/c:/files/alex.jpg"). What are you actually trying to do... it's hard to give general meaningful examples.
Johnny5 Posted March 26, 2007 Author Posted March 26, 2007 The reason behind these questions is that we are using the separation model and wanted to keep all the global fields with the front end file. So we wanted to see if we should use a global calculation field to reference the global field from the front end file. Since they will be used as key fields and we do not want the globals in the data file I thought this would be the best way.
Genx Posted March 26, 2007 Posted March 26, 2007 Why don't you want the global fields in the data file? Because, this way you'll have to reference the front end from the backend to be able to get the data... which is a pain in the butt.
Recommended Posts
This topic is 6798 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