Recued
Menu
← Back to recipes

Delete a tag

by recued-core v3 7 views

Use “Delete a tag” in Recued. Removes a tag and everything beneath it. Refuses while anything is still tagged with it.

Complete workflow

Ledger book 16 pinned recipes

Use Ledger book in Recued for accounting, double entry, budget, and records. It includes 44 built-in actions and 15 ready-to-run workflows. Actions that change data use Recued's approval controls.

You are viewing one recipe in this workflow. Installing it opens the complete pack so its other recipes and background automations arrive together.

Delete a tag
This recipe

Use “Delete a tag” in Recued. Removes a tag and everything beneath it. Refuses while anything is still tagged with it.

pack:ledger-bookaccountingtagsrecords
by recued-core pinned v3

Use “The accounts” in Recued. Every account with its id — what you post to, and what anything else in this workflow needs before it can name one.

pack:ledger-bookaccountingaccountsrecords
by recued-core pinned v3

Use “The tags” in Recued. Every tag with its id and how deep it sits — the trees you can spend against, and the ids the rest of the pack takes.

pack:ledger-bookaccountingtagsrecords
by recued-core pinned v3

Use “What it all comes to” in Recued. Each currency's balance read exactly, then converted at rates you give and added up.

pack:ledger-bookaccountingcurrencyrecords
by recued-core pinned v3

Use “Every budget at once” in Recued. All your budgets for a period, each counting everything under its tag — in four queries, however many budgets you have.

pack:ledger-bookaccountingbudgetrecords
by recued-core pinned v3
Show all 16 recipes

Use “How a budget is doing” in Recued. What a budget has left, counting everything under its tag at any depth.

pack:ledger-bookaccountingbudgetrecords
by recued-core pinned v3

Use “What went under a tag” in Recued. Everything spent under one tag, including every tag beneath it, at any depth.

pack:ledger-bookaccountingtagsbudget
by recued-core pinned v3

Use “The lines under a tag” in Recued. Every transaction line under a tag and everything beneath it — the lines themselves, not a total. With a CSV to copy.

pack:ledger-bookaccountingtagsexport
by recued-core pinned v3

Use “Open an account” in Recued. Adds an account to your chart. Its currency is fixed here and every line posted to it inherits it.

pack:ledger-bookaccountingrecordsv2
by recued-core pinned v2

Use “Post an entry” in Recued. One entry, any number of legs, written in a single all-or-nothing transaction. It will not post unless the legs sum to zero.

pack:ledger-bookaccountingdouble-entryrecords
by recued-core pinned v3

Use “Add a tag” in Recued. Adds a tag anywhere in your tree, at any depth. The tag and its place in the tree are written together or not at all.

pack:ledger-bookaccountingtagsrecords
by recued-core pinned v3

Use “Tag a month of lines” in Recued. One tree at a time: every line in a period on one page, with a picker in the tag cell.

pack:ledger-bookaccountingtagsrecords
by recued-core pinned v3

Use “Tag a transaction line” in Recued. Sets which tags a line belongs to, one per tree. Each tag and every tag above it counts the full amount.

pack:ledger-bookaccountingtagsrecords
by recued-core pinned v3

Use “Set a budget” in Recued. A cap on a tag for one period. It counts everything under that tag, at any depth.

pack:ledger-bookaccountingbudgetrecords
by recued-core pinned v3

Use “Move a tag” in Recued. Puts a tag inside a different one. Everything recorded under it follows automatically — no transaction is rewritten.

pack:ledger-bookaccountingtagsrecords
by recued-core pinned v3
View pack details, dependencies, and permissions →

It refuses while anything is tagged with it

This is the guard worth having. Nothing stops a tag being deleted while transactions point at it — they are stored as ids, not enforced references — so those rows would survive with nothing to resolve to. The money would not be lost, but it would vanish from every tag rollup while still sitting in the accounts, and the two would disagree with no error anywhere.

So: untag it first. That is a real instruction, not a hoop — deciding where that spending belongs is a decision only you can make, and doing it before the tag disappears is the only time you can still see what it was.

The check covers the whole subtree, not just the tag you named. Deleting a parent takes its children with it, so anything tagged with a child blocks it too.

What it removes

The tag, every tag beneath it, and every ancestry row that mentions any of them. In one transaction — a half-deleted tree leaves tags reachable from some ancestors and not others, and every rollup above disagrees with every other.

All of it is pure deletion, so an interrupted run leaves the tree smaller and still correct rather than inconsistent, and running it again finishes the job.

Limits

At most 100 tags beneath it, and at most 100 rows to remove. Past either it refuses rather than deleting part of the subtree — a partly-deleted tree is the one outcome worse than not starting. Delete from the bottom up if you hit it.

It needs FULL access at install

This recipe is DENIED if the pack was installed with write access — pick all. It drives a batch operation whose allow-list contains a delete (tag.prune — deleting a tag is a delete), and a batch's risk floor is the union of everything it may do, so the whole operation is classed destructive. write does not grant that.

The refusal is operation_not_granted at the gateway, which reads like a bug in the recipe rather than a scope you chose at install. It is not something the recipe can detect and explain for you — the denial happens before its first step runs.

How it works 36 steps

Inspect the data fetches, transforms, gates, and output this recipe runs.

Process (36 steps)
tag_id trim
Trim whitespace from setting tag id
has_tag compare
Check if tag id has data
tag_guard guard
Stop if has tag equals
tag ?
found compare
Check if tag record id has data
found_guard guard
Stop if found equals
below ?
below_rows default
Apply default
subtree_count count
Count items in below rows
within_cap compare
Check if subtree count is at most 100
cap_guard guard
Stop if within cap equals
tag_refs pluck
Extract descendant from each item
in_use ?
tagged_rows default
Apply default
is_free compare
Check if tagged rows equals 0
in_use_guard guard
Stop if is free equals
touching ?
edge_rows default
Apply default
edge_ops map
Extract from each item
tag_id_rows map
Extract descendant from each item
tag_ids pluck
Extract tag_id from each item
doomed ?
doomed_rows map
Extract from each item
found_tag_rows filter
Filter by condition
found_tag_count count
Count items in found tag rows
all_tag_rows_found compare
Check if found tag count equals subtree count
tag_rows_guard guard
Stop if all tag rows found equals
tag_ops map
Extract from each item
ops flatten
Flatten nested lists in
op_count count
Count items in ops
fits compare
Check if op count is at most 100
size_guard guard
Stop if fits equals
post ?
removed_tags count
Count items in tag ops
removed_edges count
Count items in edge ops
card to_summary
Format results as a summary card
Settings 1 configurable

Configurable at install. Defaults shown — change them anytime in Recued.

tag id setting = [object Object]

About

Tags

pack:ledger-bookaccountingtagsrecordsv3

Details

36 steps 1 configurable settings recipe_id: delete-tag