[Feature] Custom logic rules for filters #1417

Closed
opened 2026-02-28 19:43:06 -06:00 by GiteaMirror · 3 comments
Owner

Originally created by @CrazyKidJack on GitHub (Sep 14, 2024).

Verified feature request does not already exist?

  • I have searched and found no existing issue

💻

  • Would you like to implement this feature?

Pitch: what problem are you trying to solve?

AB currently has two options for filter logical operations. AND-ing all filters, or OR-ing all filters.
There are many situations where it would be helpful to have more complex rules. Like (a OR b) AND ((c AND e) OR e)

Describe your ideal solution to this problem

This could be implemented in many ways.
Ideally, when you add a filter condition, you could select its order in the condition list, and then you could select which operation to apply between it and the next condition as well as selecting whether or not there should be a parenthesis (group open or close) between it and the next condition as well. Ideally this could all be done with ui elements / buttons / drop downs... however

a minimal functional and "good enough" solution could look like assigning each filter condition a number and adding a text box where the user can simply type in their preferred logical expression using the numbers of the conditions like variables.

Something like:

  1. payee is google
  2. payee is amazon
  3. notes contains prime
  4. category is subscription

Expression: 4 AND (1 OR (2 AND 3))

Teaching and learning

If this was accomplished with UI elements, probably minimal documentation would be needed beyond just explaining that custom conditions are possible. The UI elements have specific buttons/options available should be fairly self-explanatory.

If this was accomplished with a text box, probably more documentation would be required to ensure people know what to put in the box. A definition of the available options with some examples would be good. Additionally, the text box would need some type of syntax checking. The validity of the syntax could be indicated by a small or at the end of the text box.

Originally created by @CrazyKidJack on GitHub (Sep 14, 2024). ### Verified feature request does not already exist? - [X] I have searched and found no existing issue ### 💻 - [ ] Would you like to implement this feature? ### Pitch: what problem are you trying to solve? AB currently has two options for filter logical operations. AND-ing all filters, or OR-ing all filters. There are many situations where it would be helpful to have more complex rules. Like (a OR b) AND ((c AND e) OR e) ### Describe your ideal solution to this problem This could be implemented in many ways. Ideally, when you add a filter condition, you could select its order in the condition list, and then you could select which operation to apply between it and the next condition as well as selecting whether or not there should be a parenthesis (group open or close) between it and the next condition as well. Ideally this could all be done with ui elements / buttons / drop downs... however a minimal functional and "good enough" solution could look like assigning each filter condition a number and adding a text box where the user can simply type in their preferred logical expression using the numbers of the conditions like variables. Something like: 1. payee is google 2. payee is amazon 3. notes contains prime 4. category is subscription Expression: `4 AND (1 OR (2 AND 3))` ### Teaching and learning If this was accomplished with UI elements, probably minimal documentation would be needed beyond just explaining that custom conditions are possible. The UI elements have specific buttons/options available should be fairly self-explanatory. If this was accomplished with a text box, probably more documentation would be required to ensure people know what to put in the box. A definition of the available options with some examples would be good. Additionally, the text box would need some type of syntax checking. The validity of the syntax could be indicated by a small ✅ or ❌ at the end of the text box.
GiteaMirror added the needs votesfeature labels 2026-02-28 19:43:06 -06:00
Author
Owner

@CrazyKidJack commented on GitHub (Sep 14, 2024):

I did not select the checkbox for "Would you like to implement this feature?".
That said, I have significant development experience and would be willing to do so. But I would need/want significant assistance getting started navigating the AB code. Once I get going, I code quickly and (I like to think) with high quality... but I always have a hard time getting into other people's code, figuring out how it works, and figuring out the best way to set up the dev environment for that project. It's really a momentum problem. If someone could help guide me to a point where I understand the code base, then I would be more than happy to hop in on this and also other features.

@CrazyKidJack commented on GitHub (Sep 14, 2024): I did not select the checkbox for "Would you like to implement this feature?". That said, I have significant development experience and would be willing to do so. But I would need/want significant assistance getting started navigating the AB code. Once I get going, I code quickly and (I like to think) with high quality... but I always have a hard time getting into other people's code, figuring out how it works, and figuring out the best way to set up the dev environment for that project. It's really a momentum problem. If someone could help guide me to a point where I understand the code base, then I would be more than happy to hop in on this and also other features.
Author
Owner

@github-actions[bot] commented on GitHub (Sep 14, 2024):

Thanks for sharing your idea!

This repository uses lodash style issue management for enhancements. That means enhancement issues are automatically closed. This doesn’t mean we don’t accept feature requests, though! We will consider implementing ones that receive many upvotes, and we welcome contributions for any feature requests marked as needing votes (just post a comment first so we can help you make a successful contribution).

The enhancement backlog can be found here: https://github.com/actualbudget/actual/issues?q=label%3A%22needs+votes%22+sort%3Areactions-%2B1-desc+

Don’t forget to upvote the top comment with 👍!

@github-actions[bot] commented on GitHub (Sep 14, 2024): :sparkles: Thanks for sharing your idea! :sparkles: This repository uses lodash style issue management for enhancements. That means enhancement issues are automatically closed. This doesn’t mean we don’t accept feature requests, though! We will consider implementing ones that receive many upvotes, and we welcome contributions for any feature requests marked as needing votes (just post a comment first so we can help you make a successful contribution). The enhancement backlog can be found here: https://github.com/actualbudget/actual/issues?q=label%3A%22needs+votes%22+sort%3Areactions-%2B1-desc+ Don’t forget to upvote the top comment with 👍! <!-- feature-auto-close-comment -->
Author
Owner

@wuwendell commented on GitHub (Jul 3, 2025):

This was the first thing I thought of when I saw the "all/any" conditional at the top of the rule creation box.

@wuwendell commented on GitHub (Jul 3, 2025): This was the first thing I thought of when I saw the "all/any" conditional at the top of the rule creation box.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/actual#1417