← Back to Week 4
Custom Search Filter Pipeline
Reports option 6 is the bonus: five inputs, all optional. A blank field is not a filter — it’s an instruction to skip. Watch transactions survive or get dropped at each stage.
Pipeline — transactions flow left to right
Date range
skip — no dates entered
pass-through
→
Description
skip — no text entered
pass-through
→
Vendor
skip — no text entered
pass-through
→
Amount
skip — no amount entered
pass-through
| Date |
Description |
Vendor |
Amount |
No transactions match the chosen criteria.
Blank means “don’t filter”, not “match blank”. If the user types nothing for a field, that field should not remove any transactions. Don’t compare “description equals empty string” — check first whether the user entered anything at all, and only then apply the filter.
Parse with care. A blank amount should skip the amount filter. A blank start date should skip the date filter. If you try to parse an empty string as a LocalDate or a double, you get an exception — so the “blank check” has to come before the parse.
Enter any combination of fields and click Apply. Stages with input are active (purple); blank stages are dashed (skipped). The bubble at each end shows how many transactions survive so far.