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.

Locking a File?

Featured Replies

I am writing a script to take transaction information from a transaction file, format it, and send it to a holding file (where the info waits to be transferred to a mainframe via PHP).

The format of the transaction file is:

Headre info

Detail Line Info

Trailer Info

So one transaction record = three records in the holding file.

I would like to lock the holding file while the three records for the transaction file are being created to avoid the possibility that two transactions are added at the same time, causing the Header / Detail / trailer order to get mixed up.

Is there a way to lock a file at the beginning of a script so that only the current user can add records?

Tell us what your set up is.

You have posted this to a general discussion topic for version 5, but reflect v7 in your profile, and asking about locking a file, which means you are probably talking about a served environment.

The Forum has many Topic Areas representing the different FileMaker Features and Functions. Each topic has a short description that suggest what type of question is expected to be posted in it. When posting find an Topic with a description that come the closes to matching the sprit of your question, and avoid the General, Special, and Sponsored Topic areas, unless their diescriptions fit your question.

Your question probably belongs in topic area, such as the Peer, Sever 5, etc. topics, that can be found in [color:blue]Serving, Sharing FileMaker - LAN, WAN & WEB. Once I know your set up, I'll move the question.

Lee

Perhaps you could create a one-record table (or file in FM5) with a field for user ID. When you run the script, first check if this field is empty. If it's not, then exit your script. If it's empty, put the current user's id in it, run your script, then clear the field when done.

Addressing Lee's concerns, since you're trying to script the locking of a file I'd have posted this in the Scripting forum.

  • Author

Lee: The setup is FM5.5, using a server.

Fitch: That's a good suggestion. I'll try that.

Edited by Guest

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.