No, I'd tried that one before. It looks like parenthesis inside any
"expr" clause will cause the parsing error. If there's no "expr", the
parenthesis is read correctly and things seem to work. In your above
suggestion, I got the parsing error at ("Receipt". If I take out the
first "expr", I get the parsing error at (transportation|food|books)/,
saying: Error: Missing '/'.
The only way I can get it to work is to have no first "expr", use tag
instead of has_tag (using has_tag simply produces no results), and have
no parenthesis in the "expr account" clause.
The ternary expression works if given as:
((to_amount(tag("Receipt")) > 0) ? to_amount(tag("Receipt")) : 1)
So really all I'm missing there is the ability to match:
= expr amount = to_amount(tag("Receipt")) and expr etc etc etc
with parentheses in.
Sorry to keep on with this -- it seems like a hassle just to get a
little convenience. On the other hand, it really does seem to be just
the one issue!
Thanks,
Eric