Recued
Menu
← Back to recipes

Tag a transaction line

by recued-core v3 10 views

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.

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.

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 “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 “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

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
View pack details, dependencies, and permissions →

The full amount, at every level above it

Tag a line to a person and it counts in full for that person, for their department, for their division and for the corporation. The same money, looked at from further out — nothing is split and nothing is apportioned.

That is what removes the reconciliation step. A query at any level of any tree, over any period, is a plain sum of the lines beneath it. There is no roll-up job, no stored subtotal to go stale, and no need to mine anything: the answer is computed from the rows at the moment you ask.

One tag per tree

A line may carry at most one tag from each tree, and a second is refused. A person sits in one department, so a line tagged to two people in the same org tree would be counted twice by every ancestor — and that double is invisible, because the total still looks like money.

Different trees are different questions. Tagging a line to a person AND a project AND a client is expected: each dimension sees the whole amount, and two budgets across different trees legitimately add up to more than you spent, because they measure the same money two ways.

Setting, not adding — per tree

Naming a project tag replaces the project tag and leaves the org tag alone. Only the trees you name are rewritten. A version that cleared everything would silently drop classifications the caller never mentioned.

⚠ Naming no tags at all is not an untag — there is nothing to remove without a tree to remove it from. Untagging a dimension means naming a different tag in it.

Swapping a tag

Naming a different tag in a tree you already used swaps it, and the line's tag COUNT does not change. The count is only written when it would actually differ — the store refuses an update with no effective change, and that refusal would take the whole write down with it.

Limits

A tag that does not exist is refused, before anything is written. A row pointing at nothing is money that has left the tag view without leaving the accounts.

⚠ At most 30 tags on one line, and the whole change must fit in one transaction.

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 (leg_tag.apply — replacing a tag means deleting the old row), 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 59 steps

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

Process (59 steps)
leg_id trim
Trim whitespace from setting leg id
has_leg compare
Check if leg id has data
leg_guard guard
Stop if has leg equals
leg ?
found compare
Check if leg record id has data
found_guard guard
Stop if found equals
no_spaces replace
Replace text in setting tag ids
leads starts_with
Check if no spaces starts with ,
trails ends_with
Check if no spaces ends with ,
doubled compare
Check if no spaces contains ,,
stray_comma any
Check if any of the conditions are true
comma_guard guard
Stop if stray comma equals
raw_tags split
Split no spaces into parts
distinct unique
Remove duplicates from
distinct_count count
Count items in distinct
has_input compare
Check if no spaces has data
input_guard guard
Stop if has input equals
named_count ternary
Apply ternary
known_tags ?
known_rows map
Extract from each item
wanted filter
Filter by condition
tags sort
Sort by id
tag_count count
Count items in tags
all_known compare
Check if tag count equals named count
unknown_guard guard
Stop if all known equals
not_too_many compare
Check if tag count is at most 30
count_guard guard
Stop if not too many equals
roots pluck
Extract root_ref from each item
distinct_roots unique
Remove duplicates from
root_count count
Count items in distinct roots
one_per_tree compare
Check if root count equals tag count
tree_guard guard
Stop if one per tree equals
existing ?
existing_rows default
Apply default
existing_count count
Count items in existing rows
existing_count_fits compare
Check if existing count is at most 30
existing_cursor_empty compare
Check if existing next cursor is empty
existing_page_complete all
Check if all conditions are true
existing_page_guard guard
Stop if existing page complete equals
desired_tags map
Extract from each item
desired_tag_refs pluck
Extract tag_ref from each item
existing_tag_refs pluck
Extract tag_ref from each item
superseded filter
Filter by condition
remove_ops map
Extract from each item
new_tags filter
Filter by condition
tag_ops map
Extract from each item
kept filter
Filter by condition
kept_count count
Count items in kept
total_tags math
Calculate: {{step.kept_count}} + {{step.tag_count}}
count_changed compare
Check if total tags does not equal leg record tag count
count_ops ternary
Apply ternary
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
has_ops compare
Check if op count is greater than 0
post ?
skip: step.has_ops equal false
removed count
Count items in remove ops
card to_summary
Format results as a summary card
Settings 2 configurable

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

leg id setting = [object Object]
tag ids setting =

About

Tags

pack:ledger-bookaccountingtagsrecordsv3

Details

59 steps 2 configurable settings recipe_id: tag-leg