Stan, 

I will preface this by repeating that I don’t use formulas or SX, so my advice 
may be corrected by others. Addressing your questions in reverse order.

With regard to exponentiation, I note that the Bank Account Interest section 
shows the expt (exponent) function (which comes from the underlying Scheme). 
When I attempted to put this into a formula (“expt (tryme 2)”), however, I got 
no results. Reading further down the wiki section, however, yields this: "If 
the formula was simple, then you could just enter it directly in the template 
transaction; unfortunately, the basic compounding-interest formula involves 
exponentiation, which can't be handled in the current expression parser, so one 
must resort to defining it in scheme…” Therefore, you must place any formulas 
with exponentiation in a defined function in fin.scm.

As for computing one split based on another, the strong implication is that 
this cannot be done. The section “formulas or scripts for periodic savings” 
says two things. First, it starts by saying “if you can express the amounts of 
the splits in the transaction as a simple expression,” which sets the 
expectation that you will be using expressions (and not references) in 
formulas. Second, it says there that formulas cannot “sum or obtain the value 
from existing accounts,” which I interpret to mean that it cannot pull 
information from different transactions. This, when you consider it, makes 
sense: how would the formula evaluation process determine which split was to be 
used?

I think the question of calculating one split based on another is covered in 
the phone bill example, in which each split is derived independently, 
demonstrating by example that you can’t compute one split based on another.

HTH,
David

> On Sep 17, 2018, at 8:37 AM, David T. via gnucash-user 
> <gnucash-user@gnucash.org> wrote:
> 
> Stan, 
> 
> I neither use formulas nor scheduled transactions, so I can’t comment on the 
> documentation. Since you do, maybe you could add some information on the wiki 
> to assist others after you?
> 
>> On Sep 17, 2018, at 8:05 AM, Stan Brown <the_stan_br...@fastmail.fm> wrote:
>> 
>> Thank you for the reply, Frank, but I read that before I posted. That's 
>> quite inadequate to tell people how to create formulas. 
>> 
>> The first three omissions that occur to me are: how do we use the value of 
>> one split in computing the value for a different split?  How do we use 
>> values from a specific other transaction to compute values for this one? How 
>> do we do exponentiation, for goodness sake?
>> 
>> -- 
>> Stan Brown
>> the_stan_br...@fastmail.fm
>> https://BrownMath.com
>> http://OakRoadSystems.com/
>> 
>> On Mon, Sep 17, 2018, at 5:06 AM, Frank H. Ellenberger wrote:
>>> Hi Stan,
>>> Am 15.09.18 um 15:37 schrieb Stan Brown:
>>>> Though I have 2.6.19, I looked on line at the 3.2 manuals, and they are
>>>> the same in this respect.
>>> 
>>> You missed one important place, the FAQ:
>>> https://wiki.gnucash.org/wiki/FAQ#Q:_How_do_I_use_variables_and_formula_in_scheduled_transactions.3F
>>> that leads to
>>> https://wiki.gnucash.org/wiki/Scheduled_Transactions
>>> 
>>> 
>>>> There doesn't seem to be any documentation of formulas for scheduled
>>>> transactions. I'm talking about the "debit formula" and "credit formula"
>>>> columns in the template transaction pane of the Edit Scheduled
>>>> Transaction window.
>>>> 
>>>> There are specific formulas for things like mortgages and payroll, but I
>>>> was unable to find the general rules for constructing formulas, neither
>>>> in the Help Manual nor in the Tutorial and Concept Guide.
>>>> 
>>>> Can this be added, please?
>>> 
>>> Yes it should be added to the docs, so as David already said, raise a
>>> bug report.
>>> 
>>>> -- Regards, Stan Brown
>>> 
>>> Regards
>>> Frank
>>> 
>> _______________________________________________
>> gnucash-user mailing list
>> gnucash-user@gnucash.org
>> To update your subscription preferences or to unsubscribe:
>> https://lists.gnucash.org/mailman/listinfo/gnucash-user
>> If you are using Nabble or Gmane, please see 
>> https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
>> -----
>> Please remember to CC this list on all your replies.
>> You can do this by using Reply-To-List or Reply-All.
> 
> _______________________________________________
> gnucash-user mailing list
> gnucash-user@gnucash.org
> To update your subscription preferences or to unsubscribe:
> https://lists.gnucash.org/mailman/listinfo/gnucash-user
> If you are using Nabble or Gmane, please see 
> https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
> -----
> Please remember to CC this list on all your replies.
> You can do this by using Reply-To-List or Reply-All.

_______________________________________________
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see 
https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-----
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.

Reply via email to