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

Private fields (variables)?

Featured Replies

I have a script that, among other things, counts records according to the content of a given field to later be displayed in a report header. I'm currently keeping the counts in global fields. However, if another user executes the same script with a different found set, the first user's global field value are mangled.

Is there a way to define a "private" field or variable (other than the copy/paste buffer in Windows) that carries values specific to the current FileMaker invocation?

Thanks for any help,

Joe

How are you using the global fields? Is this a multi-user shared network setting? In this case, changes to global fields only exist as long as the session, and are specific to that session, so multiple users can't change each other's globals. After a networked file is closed, the globals revert back to their value from the last time the file was used in single user mode.

If you're only using this file in single user mode, than the globals will stick from one session to the next. If you want user-specific values that are remembered across sessions, then you need to create a user table that contains these fields. (like preferences...)

I have a script that, among other things, counts records according to the content of a given field to later be displayed in a report header. I'm currently keeping the counts in global fields. However, if another user executes the same script with a different found set, the first user's global field value are mangled.

This is a topic that by and large is solved differently with filemaker, with the fieldtypes summary and unstored calc'fields that follows the actual layout when it comes to evaluation.

Unless you're trying something like this:

http://www.onegasoft.com/tools/fastsummaries/index.shtml

...but it still requires the definition of summaryfields, as an interesting twist to this, is that summaries now are tunneled in an iteresting way with 7.0 ... a discovery made by Comment, that we all learned a lot from:

http://fmforums.com/forum/showtopic.php?tid/159548/post/159548/hl//

--sd

I have a script that, among other things, counts records according to the content of a given field to later be displayed in a report header. I'm currently keeping the counts in global fields. However, if another user executes the same script with a different found set, the first user's global field value are mangled.

Is there a way to define a "private" field or variable (other than the copy/paste buffer in Windows) that carries values specific to the current FileMaker invocation?

A global field is private to the machine that generated in a hosted environment. What you are discribing can only happen if the second user uses the same machine as the first.

I have a script that, among other things, counts records according to the content of a given field to later be displayed in a report header. I'm currently keeping the counts in global fields. However, if another user executes the same script with a different found set, the first user's global field value are mangled.

I mentioned in my previous post the way via calc'fields ...you might even better embrace filemaker approaches to such issues by watching this:

http://previews.filemakermagazine.com/videos/585/InterfaceSummaries_full.mov

Again entirely without any scripting!!!

--sd

  • Author

OK, thanks, and I'm guilty as hell. I had a problem with the global changing and simply assumed it was because the "global" was global to the database, not the current user context. It seemed like the logical assumption.

Problem fixed - and THANKS A BUNCH!!!

and I'm guilty as hell
This is what sometimes is referred as Henry Jamesian innocence... but troubles as such usually occurs when not embracing a tools functionality quite, and instead filling out the gaps with assumptions!

--sd

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

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.