March 26, 200718 yr 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, 200718 yr by Guest
March 26, 200718 yr 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.
March 26, 200718 yr Author 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?
March 26, 200718 yr 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.
March 26, 200718 yr Author Thanks for the quick reply. So what is the benefit of global calculations then? Why wouldn't we just use unstored calculations?
March 26, 200718 yr 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.
March 26, 200718 yr Author 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.
March 26, 200718 yr 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.
Create an account or sign in to comment