Use an action of a button to insert a record into a table

Is there a procedure, when using an “Select Event -> action -> actionPerformed” to insert new records into a table instead of updating existing records in the table?

Absolutely. I assume that this is in response to a button being pressed or the like.

First of all, an important concept to know is that all actions are handled by Jython scripts. So, even though you are probably looking at the “SQL Update” tab in the Action Configuration dialog, be aware that all this tab is doing is generating a script, which you can see in the “Script Editor” tab.

To run an insert query, you are going to have to write the script directly. This isn’t difficult. In fact, the fpmi.db.runUpdateQuery function is used for running any kind of query that doesn’t return a dataset - that is, INSERT, UPDATE, and DELETE queries.

So, to cut a long story short, you just need to call that function, like this:

fpmi.db.runUpdateQuery("INSERT INTO MyTable (Column1, Column2) VALUES ('this is a string', 23)")

Please take a look at the documentation section:
Technical Reference -> Jython -> Built-in Modules (fpmi.*) -> fpmi.db
for more about Jython functions that deal with the database.

Hope this helps,