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.

Script working here but not there

Featured Replies

I have a script that works fine for me but is not working (or at least, part of it is not working) for someone else on a different workstation. Any thoughts on why this might be happening? The script creates a new record and sets a bunch of field values automatically. The part that appears to not be working involves:

a.) incrementing a global variable

b.) concatenating that new value with some other stuff

c.) putting the result into a field in the new record

Everything seems to work except the incrementing. I can't figure out why it works for me but not for someone else. The database doesn't have any security or login restrictions on it. Ideas?

What exactly do you mean by "incrementing a global variable"?

Globals are specific to each user. In order to have "global" values available to all users, I use a one-record Global table (but don't define the fields as global fields). Relate this Global table to all other tables with an X (cartesian) relationship.

I use a one-record Global table (but don't define the fields as global fields).

That's not something I would recommend lightly. Especially if the values are meant to be frequently modified.

I suspect this is one of those cases where an auto-entered serial number should be used instead of ... well, whatever it is.

  • Author

I see. I also just found this in the Help: "If your file is shared, only the host's changes to global field data are saved. Changes are saved only when the file is closed." So that explains that. It isn't quite how I would have expected a global variable to behave, but there is some logic to it.

You're right that an auto-entered serial number would be more convenient, but the string we want to create actually depends on a different variable, which can have one of two values (i.e. string1_001 or string2_001). Hence my trying to calculate it myself. I may just drop the idea and go with the auto-enter anyway. It creates a different issue down the road, but I think I can come up with a workaround. Thanks for your feedback.

Global field or global variable? You seem to be using the two terms interchangeably.

That's not something I would recommend lightly.

I remember reading somewhere that that was the way to do it. Could you explain why you don't recommend it?

--Doug

I didn't say I don't recommend it. I said I wouldn't recommend it lightly - not without knowing what it's being used for. The reason is record locking.

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.