Skip to main content
Version: 1.28 (Current)

Datasource Delete

Audience: Low-code Engineers

Skill Prerequisites: Listings, SQL

Deletes a listing item from the listing's data source, then refreshes the listing. How the item is deleted depends on the data source. For SQL data sources, it's the delete query set in the data source settings.

It's used on item buttons to delete one row, and in the Per Item Actions of a root button to delete the selected rows. It's also what the Delete Item and Bulk Delete special buttons use.

Typical Use Cases​

  • Add a Delete button to each row
  • Delete all selected rows with one root button

Don't use it to​

Action NameDescription
Datasource RefreshReloads the listing. Add it to a root button's Final Actions after a bulk delete.
Run SQL QueryRuns any SQL, for example a delete with extra checks.
Datasource EditOpens the data source's Edit Url for a listing item.
Datasource AddOpens the data source's Add Url.

Input Parameter Reference​

This action has no parameters. What gets deleted is set by the listing's data source. Use the action's Condition to control when it runs. See Common Parameters.

How each data source deletes​

Data SourceWhat happens
Database TableDeletes the row from the table where the ID Column equals the item's ID.
SQL Select, SQL Advanced QueryRuns the SQL Query for Deleting Items. Use the item's fields as tokens, for example DELETE FROM Products WHERE ProductId = [ProductId].
Connector EntriesDeletes the connector.
Action Form (Obsolete)Deletes the form entry.
Server Request (JSON)Delete isn't supported. The action shows Data source does not allow delete for this entry.

Listings generated for an entity delete the entity record.

See Listings Datasources for the data source settings.

Confirmation​

The action doesn't ask for confirmation itself. Turn on Ask For Confirmation on the button. The Delete Item and Bulk Delete special buttons have it turned on, with the message Are you sure you want to do delete this entry?.

Considerations​

  • The listing refreshes. On an item button, the listing reloads the current page and clears the selection after the delete.
  • Final action. The action returns a result to the browser, so actions after it in the same list don't run. Put any other actions before it.
  • Bulk delete. In a root button's Per Item Actions, the action runs once for each selected row, but its refresh is ignored. Add Datasource Refresh to the button's Final Actions, like the Bulk Delete special button does. Errors from single rows aren't shown there either.
  • Needs an item. It deletes the current row. Don't put it in a root button's Actions list, where there's no row.
  • Nothing is undone. The delete is permanent, unless your delete query only marks the row, for example UPDATE Products SET IsDeleted = 1 WHERE ProductId = [ProductId].
  • SQL Advanced Query. The Delete Item and Bulk Delete special buttons aren't offered for this data source. Add the action to a button yourself.
  • Listings only. Use it in listings. The User Guides module lists an action with the same name, but 1.28 has no implementation for it there.

Examples​

tip

To understand how to use the below examples, please see Running Examples.

1. Delete a row​

This action deletes the clicked row from the data source and refreshes the listing. Add it to an item button with Ask For Confirmation turned on.

{
"Title": "Datasource Delete",
"ActionType": "DataSource.Delete",
"Description": "Delete the row",
"Parameters": {}
}

2. Delete only draft rows​

This action deletes the row only when its Status field is Draft.

{
"Title": "Datasource Delete",
"ActionType": "DataSource.Delete",
"Description": "Delete drafts only",
"Condition": "[Status] == \"Draft\"",
"Parameters": {}
}

Revised 09/26/2026