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.

Set Field in related file: hit or miss?

Featured Replies

  • 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?

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

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]

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

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.