Check the wiki at https://wiki.gnucash.org/wiki/Scheduled_Transactions ???
Variables and Formulas were introduced to serve the *mortgage/loan druid* in 2002. Variables and Formulas work only in cells like Deposit and Withdrawal (or Debit and Credit if you have formal account names turned on) that require something that evaluates to a number. 1. Any text string [not followed by parens] entered in the template transaction will be recognized as a *variable*, and you will be prompted to provide a value when the scheduled transaction is created. 2. Any text string *followed by parens*, optionally with arguments, will have the string "gnc:" prepended to it and *evaluated in the scheme environment*.*Arguments* are separated with :. See fin.scm <https://github.com/Gnucash/gnucash/blob/stable/bindings/guile/fin.scm> for examples of providing functions. 3. There is a *magic variable* '*i'*, which stands for the *current instance-count of the scheduled transaction*. 1 for the first, 2 for the second, &c. It might be 0-based. - I'd like to have a variable which decrements each month, in order to automatically calculate sum-of-digits depreciation. In any case, if you know the starting point, "(42 - i)" should work. Cheers David H. On Fri, 11 Apr 2025 at 09:43, Adrian Jolly via gnucash-user < gnucash-user@gnucash.org> wrote: > I require to schedule a weekly transaction, where the Num field increments > by 1 for each transaction > > > > My template has " i + 1 " (without the quotes), in the Num field. But all I > get is " i + 1 " (without the quotes) in each and every transaction. What > am I doing wrong? > > > > > > > > Adrian > > > > > > _______________________________________________ > gnucash-user mailing list > gnucash-user@gnucash.org > To update your subscription preferences or to unsubscribe: > https://lists.gnucash.org/mailman/listinfo/gnucash-user > ----- > 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 ----- Please remember to CC this list on all your replies. You can do this by using Reply-To-List or Reply-All.