Right now (the guide indicates), we can put calculations in fields using the operators +, -, /, and *, plus parentheses. I would love it if we could add ^ to this list to perform exponentiation.
Rationale: This would allow me to easily create an entry that involves compound interest, e.g. P * (1 + r/n)^(n * t) - P, which is a thing that I have reason to do with regularity.
Hey, guess what? I just tried this in a field and…it worked?
Can we assume that this feature is intentional and is here to stay? If so, I change my request to “Please update the documentation to indicate that this works :-D”
@lubos I simply hadn’t tried it - I read the docs first and believed them.
I guess my follow up question is “Is there any way to use the current balance of the account as a variable in the calculation as I enter it?” My assumption is “No” but I figured it’s worth asking.
@lubos, as I tested this, I discovered that braces are no longer recognized as they formerly were. The current Guide, for example, shows as an acceptable example:
But, if you enter the same expression now, the program rejects it and flags it in red:
I don’t think braces were ever supported. Probably the previous versions were ignoring them while current version does not. Nested parentheses was always the way to go.
This is especially helpful when you remember the calculation formula is not stored when the transaction is created or updated. Only the result is stored, as though it had been entered as a number directly. Without some fixed annotation, you will never know what formula you entered.