Recued
Menu
← Back to recipes

The lines under a tag

by recued-core v3 92 views

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.

Complete workflow

Ledger book 18 pinned recipes

Use Ledger book in Recued for accounting, double entry, budget, and records. It includes 44 built-in actions and 17 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.

The lines under a tag
This recipe

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

Use “One account” in Recued. Everything the book holds about one account, opened from the Accounts list.

pack:ledger-bookaccountingaccountsdetail
by recued-core pinned v1

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
Show all 18 recipes

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 v4

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

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 v4

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 v4

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 v4

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 v4

Use “One budget” in Recued. Open one budget from the list that names it, and read everything recorded about that budget on one page.

pack:ledger-bookbudgetdetailnavigation
by recued-core pinned v1
View pack details, dependencies, and permissions →

The lines behind the number

tag-spend tells you a division spent £14,320 last month. This tells you which transactions those were. Ask about a person, a department or the whole corporation — the same question at any level, because a line tagged to a person is counted at every level above them.

⛔ Each line appears ONCE, at its full amount. A tag tree is one dimension and a line carries at most one tag from it, so a subtree read reaches each line exactly once. The total at the bottom of this page therefore matches tag-spend for the same filter — and if it ever does not, one of the two is wrong rather than differently scoped.

⚠ A line's other dimensions are not shown. The same £60 may also be tagged to a project and a client; this page is the one tree you asked about. Tags counts how many dimensions a line carries, so you can see when there is more to it.

The CSV

⛔ It is text to copy, not a file to download. There is no render type that hands you bytes — copyable is what exists, and it pastes into a spreadsheet. Saying it plainly beats a button that does not work.

⚠ The CSV carries the same rows as the table, but NOT the same columns — Line id is on the page and deliberately not in the export. It is a handle for asking the next question (tag-leg takes it); a spreadsheet reconciles against the journal entry, which entry already carries. An export is a contract with a reader outside this run, so its column list is authored rather than derived. The rows are in the same order, including the amounts as fixed-point strings rather than as anything a spreadsheet might round. A separate export path would be a second thing to keep true.

Limits

⛔ At most 100 tags beneath the one you name, and 200 lines. Past either it refuses rather than returning part of the answer — a short list of transactions is indistinguishable from a complete one, and you would reconcile against it.

How it works 55 steps

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

Process (55 steps)
■ tag_id trim
Trim whitespace from setting tag id
■ currency_raw trim
Trim whitespace from setting currency
■ currency uppercase
Convert currency raw to uppercase
■ inputs_ok all
Check if all conditions are true
⚠ inputs_guard guard
Stop if inputs ok equals
◆ tag recued-core.ledger-book.tag.get
Get tag on ledger book
■ found compare
Check if tag record id has data
⚠ found_guard guard
Stop if found equals
◆ edges recued-core.ledger-book.tag_closure.search
Search tag closure on ledger book
■ edge_rows default
Apply default
■ descendant_count count
Count items in edge rows
■ within_cap compare
Check if descendant count is at most 100
⚠ cap_guard guard
Stop if within cap equals
■ any_tags compare
Check if descendant count is greater than 0
⚠ tags_guard guard
Stop if any tags equals
■ tag_refs pluck
Extract descendant from each item
■ period trim
Trim whitespace from setting period
■ has_period compare
Check if period has data
■ account_id trim
Trim whitespace from setting account id
■ has_account compare
Check if account id has data
■ both all
Check if all conditions are true
■ period_only all
Check if all conditions are true
■ account_only all
Check if all conditions are true
■ neither all
Check if all conditions are true
◆ hits_neither recued-core.ledger-book.leg_tag.search
Search leg tag on ledger book
skip: step.neither equal false
◆ hits_period recued-core.ledger-book.leg_tag.search
Search leg tag on ledger book
skip: step.period_only equal false
◆ hits_account recued-core.ledger-book.leg_tag.search
Search leg tag on ledger book
skip: step.account_only equal false
◆ hits_both recued-core.ledger-book.leg_tag.search
Search leg tag on ledger book
skip: step.both equal false
■ hits coalesce
Use the first available value from: hits both, hits period, hits account, hits neither
■ hit_rows default
Apply default
■ hit_page_complete compare
Check if hits next cursor is empty
⚠ page_guard guard
Stop if hit page complete equals
■ line_count count
Count items in hit rows
■ leg_id_rows map
Extract leg_ref from each item
■ leg_ids pluck
Extract leg_id from each item
■ distinct_leg_ids unique
Remove duplicates from
■ distinct_line_count count
Count items in distinct leg ids
■ one_hit_per_line compare
Check if distinct line count equals line count
⚠ duplicate_line_guard guard
Stop if one hit per line equals
◆ lines_raw recued-core.ledger-book.leg.get
Get leg on ledger book
■ line_rows map
Extract from each item
■ found_line_rows filter
Filter by condition
■ found_line_count count
Count items in found line rows
■ all_line_rows_found compare
Check if found line count equals line count
⚠ line_rows_guard guard
Stop if all line rows found equals
■ line_refs map
Extract from each item
■ joined enrich_by
Apply enrich_by
■ rows map
Extract from each item
■ sorted sort
Sort by date
■ pennies map
Extract from each item
■ total_pennies sum
Sum values in
■ total math
Calculate: {{step.total_pennies}} / 100
■ table to_table
Format results as a data table
■ csv to_csv
Serialize rows as a CSV string
■ card to_summary
Format results as a summary card
▼
Output
summary card
table table
copyable csv
Settings 5 configurable

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

limit setting = 200
period setting =
tag id setting = [object Object]
currency setting = GBP
account id setting =

Uses (4 operations)

Pack operation Get tag on ledger book recued-core.ledger-book.tag.get
Pack operation Search tag closure on ledger book recued-core.ledger-book.tag_closure.search
Pack operation Search leg tag on ledger book recued-core.ledger-book.leg_tag.search
Pack operation Get leg on ledger book recued-core.ledger-book.leg.get

Trust & control

What installing this recipe would let it do. Recued grants these permissions at install — review them there before approving.

What it's allowed to do

Read Pack Ledger book read-only
Read: tag.get · No approvalRead: tag_closure.search · No approvalRead: leg_tag.search · No approvalRead: leg.get · No approval

About

Tags

pack:ledger-bookaccountingtagsexportrecordsv3

Details

55 steps 5 configurable settings recipe_id: list-entries