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.

One at a time script access

Featured Replies

Has anyone come up with a really robust way of preventing more than one user in a multi-user database from running a particular script at the same time?

I have a few ideas based on having the script test and then enter a particular field in a separate file which would then lock out others, but was wondering if anyone has experience with this before I spend a lot of time and effort testing the idea.

I was going to suggest using the Status[CurrentMultiUserStatus] function, but that would only allow the script to be run based on the number of current users, which is different from what you are asking for (lockout of script performance).

Your suggestion is the only way that I can think of. Is it robust? Well, any system that relies on the setting of a field value is open to errors if the process is aborted before completion.

A frequent problem with setting flags is that an abnormal exit from FM prevents the flag from being reset and everyone is locked out until the flag is manually reset. Having said that, I don't know of a better way to do this sort of locking. -bd

  • Author

I was sort of thinking that I wouldn't actually change the value of the test field. I would just use the 'go to field' step and then check to see if that produces a locked record error. If so, the script would loop through a pause then test again etc.

Oh well, I guess there's only one way to find out.

BTW, this is related to an earlier post of mine where I suspected that two users simultaneously running the same script were causing some records to get corrupted. We did some testing, and it looks like that was the cause of the problem. Now, I just have to find a solution.

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.