Is there a way to listen to changes being written using ADD
or PUT
and in my case, log this and call an API to submit the same changes elsewhere?
The answer is yes whether your question was a database question or a Clarion question.
In both cases triggers are possibly what you are looking for. In my opinion, the use of triggers to change data elsewhere is a bad idea (OK for logging), and on the database side I would recommend having a procedure in the database that takes the column values and updates/inserts whatever tables are required. Makes it much more obvious what is happening and is easier to maintain/debug.
Need more details … that should be in most questions.
Legacy or ABC Templates?
What File Driver(s)?
I think you’re using Legacy templates so the way I can think of is the File Callback Interface. See the Help on that and CALLBACK(). See ABFile.clw for an example.
It’s Legacy (Clarion 8) with Topspeed filedriver - and I meant more inside a Browse/Form - as I need to sync some information to an external platform - I thought reacting to writes would be easier than going through the code and checking each ACCEPTED
or what ever else to call it
If it’s just that particular Form and not all the time, In the form you want window.TakeCompleted, After Parent. Before parent you get to stop the update by returning false. After parent it’s all done.
The other option is .kill, but you need to test if GlobalResponce = RequestCompleted
If it’s all the time then a client trigger as per Jon
Legacy Sean, not ABC.
Oh yeah! Oops. In that case I have no idea