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

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

Recommended Posts

Posted

I have a solution I'm working on that has the data completely separated from the interfaces by way of files. The files have file references as normal. My problem is that I need to have a field exit script trigger a script. No problem with ZipScript pluggin.

But the issue is that when I call the script when it's resident in the data file, it needs to update a field. But that table is open in the interface file that originally modified it, so I get the infamous

"This record cannot be modified in this window because it is already being modified in a different window".

I want to modify the field in the table in the data file to call the script which i copied to the interface file. By the way, the script runs fine in manual mode at the interface.

Posted

Check your field definition in the data file; the auto-entry calculation is what triggers the script. It's common to use Get(FileName) here to tell the plugin where the script is. But that won't work when the script is in a different file -- you'll need to hard-code the name of the interface file into the trigger calc.

The record-locking is a separate issue. Normally in the separation model, you never interact with the data file directly. Are you working with multiple users? Are you working with multiple windows that interact with the same record or related records? I'd have to know more about your script and the way you're testing it to address this.

Posted

Thanks for the follow-up. Sometimes it can feel like a lonely place working on Filemaker.

I found a way around the field calc/trigger problem by creating a stub script in the data file. That script is referenced by the original field, but it merely calls perform script referring to the target file/script.

As for the solution, it's a separation model with multiple windows potentially working from multiple people/workstations. Primarily, it's multiple workstations. For example, a two people will be entering sales orders. But you might also have someone working on new product entries which affects inventory, and two, five or even ten people entering sales, another person doing receiving. All affect the inventory table(s).

Is there something I should be worried about?

Posted

the issue is that when I call the script when it's resident in the data file, it needs to update a field.

Is it really??

http://www.fmforums.com/forum/showpost.php?post/282164/

--sd

Posted

I probably shouldn't have brought up multiple users - that's a different kind of record locking. My point was that, based on the error message you were getting, there might be something you could change in your script that would correct this, e.g. add a Commit step before you jump to a different window.

It's not necessary to have redundant scripts in your data file. But I'm glad you solved your problem.

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