Jump to content
Server Maintenance This Week. ×

Set Field in related file: hit or miss?


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

Recommended Posts

  • Newbies

When running scripts that Set Field in a related file on the network, sometimes it works and sometimes it doesn't. I've captured errors, and it is 102: Field is missing. If I run the script twice, it might work once, and fail once. Or work twice. Or fail twice. Anyone have any idea why? The original file and the related file are on FMProServer5, and there are no problems with the network. Is it possible that more than one user are trying to change the same field at the same time? If so, is there a way around this?

Link to comment
Share on other sites

  • Newbies

Hi Rodhaden

I'm sorry I don't have a solution to your problem BUT, just as an answer to your last question, as far as I know, it is not possible for more than one person to be working on the same record at the same time over a network, I don't think FM allows this, so the answer must lie elsewhere. As I said, though, I am not 100 per cent sure about this. Sorry I couldn't be of any more help.

Link to comment
Share on other sites

quote:

Originally posted by rodhaden:

When running scripts that Set Field in a related file on the network, sometimes it works and sometimes it doesn't. I've captured errors, and it is 102: Field is missing. If I run the script twice, it might work once, and fail once. Or work twice. Or fail twice. Anyone have any idea why? The original file and the related file are on FMProServer5, and there are no problems with the network. Is it possible that more than one user are trying to change the same field at the same time? If so, is there a way around this?

I would start by running your "Set Field" script in the related file itself, rather than in the other file. This should eliminate and kind of network, layout or relationship problems.

If it still fails after than point, hopefully giving a different error code, you could look into the possibility of these records being used by someone else.

The only real way around record locking is to setup some kind of system where you first check a flag field to see if the record is available, flag it as "in use", and then perform your operation, flagging it as "available" afterwards. Use a text (NOT global) field in the related file as the flag.

If the record is already flagged as "in use" your script could loop a while and keep checking, or could simply abort the procedure and inform the user that the operation failed.

------------------

=-=-=-=-=-=-=-=-=-=-=-=-=

Kurt Knippel

Senior Filemaker Developer

http://www.inthescene.com

mailto:[email protected]

=-=-=-=-=-=-=-=-=-=-=-=-=

Link to comment
Share on other sites

This topic is 8712 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
×
×
  • Create New...

Important Information

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