Search code examples
phpmysqlfilemaker

Can FileMake Pro script triggers call external PHP script?


I am working for my client who has a PHP application that syncs to FileMaker Pro after an account is created and deposit is paid for services, however now they are needing to update a field in the MySQL of the PHP application when they update a specific field in FileMaker. Unfortunately, due to the vagueness of FileMaker's documentation I am unable to determine if an external script can be called with the Script Triggers as I am hoping they can.

Any information would be beneficial, thanks!


Solution

  • You could use a script trigger in FileMaker combined with the "Open URL" script step to hit a PHP script on your web server.

    There are a few issues with this:

    If the field changes outside the layout with the trigger on it, the script will not fire.

    The user will need to wait while the URL is fetched, or times out trying. To be sure the script finishes, you could use an onObjectValidate script trigger, which returns false if the URL is not fetched successfully.