
For this purpose, a script trigger is set up, for example "OnObjectValidate" or "OnObjectSave", which calls a script for the automatic entry of the desired data in the other fields. However, if the field with the script trigger is regularly in the tab sequence, FileMaker automatically places the cursor in the next field of the tab sequence after calling the script trigger and executing the corresponding script. In portals, FileMaker usually automatically jumps to the next related data record.
The field has not yet been left
In your script that was called by the script trigger, you can also integrate any commands for saving the data record, but these have no effect on the automatic jump to the next field or the next related data record. This is because FileMaker has not yet left the corresponding field after the script has been executed by the script trigger. For example, if you set the script trigger "OnObjectValidate" or "OnObjectSave", FileMaker executes the triggered script at the moment of validation or saving. After execution, FileMaker returns to the original field and does not leave the field until the script has been executed.
Script result '0' cancels all scripts
The solution to this problem is simple, you just have to figure it out first. In your script, which is called by the script trigger, add the command
Exit current script [Result: 0]
is added. It is important that you specify 0 as the script result, because this script result automatically cancels all further processes and FileMaker no longer automatically jumps to the next field or the next related data record.

Markus Schall has been developing individual databases, interfaces and business applications based on Claris FileMaker since 1994. He is a Claris partner, FMM Award winner 2011 and developer of the ERP software gFM-Business. He is also a book author and founder of the M. Schall Publishers.
