A VERY CLEVER WAY to trigger a script on another #filemaker client by #clickworks. The core secret is to use the #onrecordload script trigger to run when a user deletes a record on the remote client. Since it is a script being triggered, almost anything you can script can be triggered on the remote host.
ConceptThis technique can be used to trigger every desired script on another user’s client. You can also use it to trigger a script on a robot client on demand. The script is really triggered on-click and not by some timer script running in the background…No plugins required. You can embed this technique in any FileMaker project. It even works with FileMaker Go & FileMaker WebDirect!The only requirements are that the file must be hosted and must be opened on the other client. A ‘listening’ layout must be active but it can be opened in a hidden window so that the user doesn’t notice it.
The OnRecordLoad script triggerThe key technique used to trigger a script on an other client is the OnRecordLoad script trigger. This script trigger is not only fired off when loading a record — the common use of the trigger — but also when deleting the active record! If you delete the active record, FileMaker must load another record… or no record, when there are no records in the found set anymore. At that moment, OnRecordLoad is triggered and a dispatching script can check if some actions must be performed. Now here comes the nice thing: deleting the active ‘listening record’ of a certain client can perfectly be done by an other client!