Jump to content

One at a time script access


This topic is 7887 days old. Please don't post here. Open a new topic instead.

Recommended Posts

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This topic is 7887 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

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