Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

Posted

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?

Posted

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

Posted

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.

Posted (edited)

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

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

Edited by Guest

This topic is 6732 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.