Creating a rule from a transaction
The Rules page is fine for bulk editing, but most rules are easier to write when you're looking at a real transaction. LedgerBear has a shortcut that lets you create a rule directly from the transactions table, pre-filling the fields from the row you're looking at.
The shortcut
- On any account's Transactions tab, right-click the row you want to base the rule on.
- Choose Create Rule... from the context menu.
The Create Rule form opens with these fields pre-populated from the row:
- Account — set to the current account, not "All Accounts". Change it to "All Accounts" if you want the rule to apply elsewhere too.
- Criteria — set to Begins With.
- Memo Pattern — set to a sensible prefix of the row's memo. LedgerBear strips common trailing noise (dates, transaction IDs, location codes) so the pattern stays stable across variations. Review and tighten if needed.
- Payee — set to the row's payee if it already has one; otherwise blank.
- Category — set to the row's category if it already has one; otherwise blank.
Adjust any of these as you would in a fresh Create Rule form (see Writing a rule) and click Create.
Edit Rule instead of Create Rule
If a rule already matches the row you right-clicked, the menu item reads Edit Rule... instead. Clicking it opens the matching rule in the editor with its current values so you can refine the pattern or change the category. This is handy when you're reviewing imported data and realize an existing rule needs a nudge.
When to use this shortcut
- You've just imported a CSV and you're categorizing transactions by hand. As you recognize a pattern, right-click a representative row and create a rule in place — the next import will handle the rest automatically.
- You're cleaning up memos. Use a row with an ugly bank memo to bootstrap a rule that sets a clean payee.
When to open Rules directly instead
- You're writing a rule that doesn't match any existing transaction (e.g., a new subscription that hasn't posted yet).
- You want to write a rule scoped to "All Accounts" and prefer to start from a blank form rather than changing the scope in a pre-filled one.