Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
Juggernaut

Calculations referencing global fields

Featured Replies

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 by Guest

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.

  • 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?

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.

  • Author

Thanks for the quick reply. So what is the benefit of global calculations then? Why wouldn't we just use unstored calculations?

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.

  • 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.

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

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.