English
Table — delete a row
Removes the row carrying this key. Nothing to remove is a success, not an error.
Removes the row of a Table that carries a given key. Use it to clean up: a case closed, a reminder no longer needed, a temporary entry. Finding nothing to remove is a success, not an error, so a clean-up workflow can safely run twice.
At a glance
- Type:
table.delete· version 1 - Category: Actions
- Kind: Step — one stage of a run
- Effect: Writes outside (
external_write) — writes outside Mankomail; described instead of performed during a test run - Needs a carrier email: No
- Connection: None
- Inputs:
main - Outputs:
main
Parameters
table
Table — Picked from the list, or by its short identifier (its “slug”), which may come from a template.
- Type: Remote resource (
resourceLocator) - Required: Yes
- Ways to choose: pick from a list, type an ID (
table)
key
Row key — The row to remove, designated by the values of its “key” columns.
- Type: List of items (
collection) - Required: Yes
- Default:
[] - At most 8 items
- Each item has:
column— Key column- Type: Text (
string) - Required: Yes
- Default:
""(empty) - 60 characters at most
- Expressions:
{{ }}not accepted
- Type: Text (
value— Value to match- Type: Text (
string) - Required: No
- Default:
""(empty) - 10000 characters at most
- Type: Text (
Outputs
main
Data produced
What this node adds to the run data, and how to read it in an expression. <step> stands for the step key: the node name turned into an identifier (see Data and expressions).
{{ data.<step>.deleted }}—number. The number of rows removed: 1, or 0 when no row carried the key. In a test run, the number that would have been removed.{{ data.<step>.reused }}—boolean. true when the step was replayed after an incident: the deletion had already happened and nothing was removed again (deleted is then 0).{{ data.<step>.simulated }}—boolean. true in a test run: nothing was removed.{{ data.<step>.summary }}—string. A one-line summary:1 row deleted.,No row to delete.orWould have deleted the row.
Example
When a case is closed, its pending reminder is removed from the table pending_reminders (key column case_number). The node is named "Drop reminder".
text
table pending_reminders
key case_number = {{ data.read_closure.case_number }}{{ data.drop_reminder.deleted }} is 1 if a reminder was pending, 0 otherwise. Both outcomes continue on the same output.
Tips
- Nothing to remove is not an error. Branch on
{{ data.<step>.deleted }}with a Condition (If) node if you need to know. - The key lists the values of the columns ticked Part of the matching key in the table, by machine key; matching ignores case, accents and punctuation. A missing key part fails the step with
table.invalid_value; a table with no key column fails withtable.no_key. - One row at a time. The node removes the row carrying the key; lookup by key relies on the table option Refuse two rows with the same key.
- Replays never remove twice. A replay after an incident finds the deletion already recorded and removes nothing, even if someone has re-created the row in the meantime.
- Test runs. Nothing is removed. The row is really looked up, and
deletedsays whether the run would have removed one. See Test runs.