April 12, 20169 yr I'm creating a simple system to update a remote FM file from an android device, using Cellica Database". http://www.cellica.com/Products.html An ODBC connection has been created, and I can add, modify and delete records in my FM database from my android. I want to trigger a script in FM when a field is modified via the ODBC connection. None of the native FM script triggers work as they are dependent on layouts or user actions. I have tried DoScript, Scriptmaster and EventScript - using field validation. All work OK if I modify the value within FM, but none trigger when the value is modified via ODBC. With EventScript and DoScript, I get a failure message on the device that the record failed validation. With ScriptMaster "CallScriptImmediately", the record updates OK, but the script is not triggered. Any suggestions ?
April 12, 20169 yr You can use the XML API to run a script... https://fmhelp.filemaker.com/docs/14/en/fms14_cwp_guide.pdf see page 21 and following All you need to do is do a -findAny to return a random record and use the -script option to run your script. If you want the script to run on your newly created or updated record then use the XML options to find the record and then run the script. Of course once you start using the XML API you may choose to abandon the ODBC route altogether...
April 13, 20169 yr Author Thanks Wim. I had no idea that you can use a browser like that to view data and perform actions in a hosted database. But my original question still remains - is there a way to trigger a script automatically when a field value is changed via ODBC ? Edited April 14, 20169 yr by djlane Alternative suggested, but original question not answered
Create an account or sign in to comment