row := db_update_row(Args{database_id: "...", row_id: "abc123xyz"})
send_text_message(Args{channel_id: trigger.channel_id, message_content: "Row ID: " + row.row_id})
Database Update Row
BlockDatabases
Update an existing row in a database with new values.
- 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 update.
Example: abc123xyz
Update Mode
How to handle empty fields: keep existing values or replace with empty.
OptionsKeep existing valuesReplace all values
Outputs
Row ID
The unique ID of the updated row.
Example: abc123xyz
Updated
Whether the row was successfully updated (true/false).
Example: true
Row JSON
The updated row as a JSON object, including system fields (__id, __created_at, __updated_at, __created_at_unix, __updated_at_unix).
Example: {"__id":"abc123","name":"example"}
Build a bot using blocks like Database Update 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_update_row- Database columns are extra inputs/outputs named
dbcol_<column name>.
Inputs
| Field | InventScript name | Value |
|---|---|---|
| Database | database_id | |
| Row ID | row_id | e.g. "abc123xyz" |
| Update Mode | update_mode | "Keep existing values", "Replace all values" |
Outputs
| Field | InventScript name | Value |
|---|---|---|
| Row ID | row_id | e.g. "abc123xyz" |
| Updated | updated | e.g. "true" |
| Row JSON | row_json | e.g. "{\"__id\":\"abc123\",\"name\":\"example\"}" |
Example InventScript
More databases blocks
Database Lookup (Single)Find a single row from a database matching your query. Returns the first matching row.Database Lookup (Iterator)Find multiple rows from a database and iterate over each one.Database Create RowCreate a new row in a database with the specified values.Database Duplicate RowDuplicate an existing row in a database by its ID.Clear Row DataClear selected columns from a database row. Does nothing if the row does not exist.Clear Matching Row DataFind rows matching a query and clear selected columns from all of them.Update Matching RowsFind rows matching a query and update them all with the specified values.Delete Matching RowsDelete rows matching a query and return how many were deleted.Database Delete RowDelete a row from a database by its ID.