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

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

Recommended Posts

Posted

I'm creating records in FileMaker via JDBC using a Java Applet . After the record is created and populated - which works just fine - I need to trigger a script to do other processing of the record. JDBC and the SQL query language does not appear to offer any way to do this. FM10's Script Triggers are object specific so that appears to rule them out. I can think of work-arounds like using a timed script, but I want the post processing to happen immediately before a user get ahold of the record.

We're using both FM9 and FM10 with various clients who have this solution so ideally the answer would not be 10 dependent, but if there is a way to do it with script triggers we would consider moving them to 10.

Posted

Hi Will, and Welcome to the Forum,

Scrpt Triggers are v10 only so that lets them out. Maybe a plugin or something, however, why not explain what you are trying to accomplish in greater detail, perhaps we can provide a better solution. i.e. Auto Enter Formatting.

Lee

Posted (edited)

Hi Lee,

Thanks for taking a look at this.

For background: We have a Java based application that manages auctions, passing data between FileMaker and MySQL servers and back with the Java app being primary control interface. We use a the FileMaker interface when doing non-web auctions. I only do the FM part and provide what is needed by the Java/SQL programmer.

In the past, in the FM6 iteration of this system, the Java app used ODBC to save all completed auction records to a buffer file. We then periodically imported those records into a 'sold lots' file, performing a number of steps including updating linked inventory records. We are now working in FM10 and seeing if we can simply add the newly sold records directly to the 'sold lots' table.

The issue is that we still need to perform the post processing steps of updating the linked Inventory records, calculating commissions, etc. And, that processing needs to happen immediately before someone using FileMaker tries to access the record. So, I need a way to trigger a script after the record is created via JDBC. If we were using PHP, we could easily do this, but we're not. And I'm pretty sure that if we were using JDBC to FileMaker Pro (as opposed to FMS), we could trigger the script using a plugin like ZippScript or DoScript, which are triggered via the auto-enter by calculation part of the field definition and don't rely on an object on a layout the way FM10's script triggers do.

The problem comes with the fact that in most cases we are not talking to FMP but FMS using JDBC and FMSA. I don't know if FMS/FMSA will use or recognize a plugin like DoScript place in it's Extensions directory.

To clarify one other thing, this setup has been in development for a long time. There might be alternate ways of doing things like using PHP but that's not going to happen in the short term. My options as far as I can tell, are:

1. Find a way to trigger a script after the record is created

2. Hide the records from the end user until a script can be run manually or via a Timed script

3. Go back to the way we did things before where we put all records in a 'buffer' table and then wait for the user to click "Process incoming records"

Edited by Guest
Posted

As everything here is scripted you don't appear to need script triggers. You can run a Filemaker script from an external application. I don't know how to do this from Java but am sure it must have been done. Look at Applescript or VBScript examples to see how it is done.

A quick google produced this:

http://www.acmetech.com/products/filemaker_java_plugins/javacompanion.html

which seems might do all you want. However, as it appears to be in beta beware - I have had crashes caused by plug-ins.

Posted

Someone just pointed me to 360works free ScriptMaster plugin which can apparently trigger a script on a field value change. It seems to indicate that it can do this on FM Server as well, so I'm looking into what's possible. Seems like a great plugin.

http://www.360works.com/scriptmaster/

Posted

JavaCompanion seems to be a way to use Java programming within a plugin rather than what I might be looking for which is a way for a Java app, while talking to FileMaker via JDBC, to trigger a script.

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