Jump to content

Trigger a script when a field value is changed via ODBC


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

Recommended Posts

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 ?

 

 

Link to comment
Share on other sites

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...

Link to comment
Share on other sites

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 by djlane
Alternative suggested, but original question not answered
Link to comment
Share on other sites

This topic is 2265 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
 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.