Scheduled Transaction formula support string literal parameters.

Yaocl chunlinyao at gmail.com
Fri Feb 27 19:55:07 EST 2015


Hi

Thank you for your response.

On Sat, Feb 28, 2015 at 1:25 AM, Derek Atkins <warlord at mit.edu> wrote:
> Hi,
>
> Unfortunately this is a naive approach to this; Account names can (and
> do) change.  You really need to use the internal Account GUID in the SX
> storage.  But of course you want the user to be able to use the Account
> Name.  So really what you need here is an input UI that lets the user
> input the account name, but then internally it gets translated into the
> account GUID..  For this I would almost recommend a "Function Editor"
> popup dialog to help.

You're right, A Function Editor is useful for average user. But that
will be more complicated. Something like store account GUID as in SX
storage, use some index in formula to refer to the account GUID,
introduce new parameter type into gnc expression.

I think the user who pass the account name into the formula should
known that account name can not be changed. Just like who use the
account balance to calculate amount should understand change the
balance after scheduled transaction was generated will cause
inconsistency.

> It's so much more complicated than what you have.  :(
>
> Moreover, you need the *date* in there, because you really want to be
> able to call xaccAccountGetBalanceAsOfDate() in the SX, because the SX
> is run at a particular date that may be in the past.
I agree, I must get scheduled date from somewhere.


More information about the gnucash-devel mailing list