Database Duplicate Row

BlockDatabases

Duplicate an existing row in a database by its ID.

  • Gets an extra input or output for each column of the database you pick.

Inputs

DatabaseRequired

Select the database containing the row.

Row IDRequired

The unique ID of the row to duplicate.

Example: abc123xyz

Outputs

Row ID

The unique ID of the duplicated row.

Example: abc123xyz2

Duplicated

Whether the row was successfully duplicated (true/false).

Example: true

Row JSON

The duplicated row as a JSON object, including system fields (__id, __created_at, __updated_at, __created_at_unix, __updated_at_unix).

Example: {"__id":"abc123xyz2","name":"example"}

Build a bot using blocks like Database Duplicate Row

Use this block in our visual flow editor. Bots are hosted 24/7 for free on inventor.bot.

Advanced Documentation

This documentation can be useful when using code mode. View as Markdown

ID: db_duplicate_row
  • Database columns are extra inputs/outputs named dbcol_<column name>.

Inputs

FieldInventScript nameValue
Databasedatabase_id
Row IDrow_ide.g. "abc123xyz"

Outputs

FieldInventScript nameValue
Row IDrow_ide.g. "abc123xyz2"
Duplicatedduplicatede.g. "true"
Row JSONrow_jsone.g. "{\"__id\":\"abc123xyz2\",\"name\":\"example\"}"

Example InventScript

row := db_duplicate_row(Args{database_id: "...", row_id: "abc123xyz"})
send_text_message(Args{channel_id: trigger.channel_id, message_content: "Row ID: " + row.row_id})

More databases blocks