Insert - Add a record to a database table

This action adds a new record to a database table.

Triggers

<Record> (non-repetitive trigger [required]): The record to add (a data structure with the record's fields).

The database table is identified by the tableName property of the data type of <Record>.

The structure of the database table is automatically inferred from the structure of the added record:

<Data Source> (non-repetitive trigger [not required]): Name of data source to use (if different from the default data source; see Connecting to an External Database).

<Table Name> (non-repetitive trigger [not required]): Name of the database table (if different from the tableName property of the data type of <Record>).

<Auto Commit> (non-repetitive Boolean trigger [not required]): Indication whether to interact with the database in auto-commit mode.

If <Auto Commit> exists and a Yes value is received, the database action is performed in auto-commit mode, regardless of any active transaction (see Database Transaction Support in Tersus).

Exits [none required]

<Inserted> (non-repetitive exit [not required]): The input data structure, in case the record has been added to the table.

<Duplicate> (non-repetitive exit [not required]): The input data structure, in case the record has not been added (as the table contained another record with the same key).

Notice: The two exits represent two mutually exclusive possibilities: <Inserted> is activated only if the record has been added to the table; <Duplicate> is activated only if it has not been added. You can use the action with just one of the exits (if there is only one case that is interesting) or with both exits. You can also use the action with none of them (if none of the exits exists, you can, but not have to, add a <Done> empty exit, which will be activated in both cases).

Usage Example

"Submit" (at the end of stage 3 of the tutorial):