Edit

GetMovement (searchExpression, fromPeriodOrDate, toPeriodOrDate[, Budget])

Result Type: Number

Definition: Returns the movement from the period (or the period that which contains the from Date) to the period (or the period that contains to Date), for the Ledger records that match the searchExpression. If you want to get budget information instead of actual, the optional Budget parameter should be “A” or “B” to indicate the desired budget.

Examples:  GetMovement("Type = `Ex` and Category = `CS`", '1/7/2004', '31/12/2004', "A")

returns the budgeted movement (for the A budget) from the Jul to Dec 2004 period for expense accounts whose category is CS. Note that the Ledger file (not the Accounts file) is searched—Category in the ledger file has the same value as Category1 in the Accounts file.

GetMovement("Type = `IN`", '1/1/2000', today())

returns the movement up to now of all income accounts since Jan 2000 period.

Note:  For efficiency when writing reports that iterate over Ledger records, there is a Ledger method variant of the GetBalance function that applies specifically to a single, loaded Ledger record._

ledger.GetMovement (fromDateOrPeriod, toDateorPeriod [, Budget])

Result Type: Number

Definition: Must be used in the context of a selection of ledger records, i.e. within a ForEach L in Ledger loop in a report. Returns the movement of the ledger between the specified periods (or the periods identified by the date). The function will respect the “Include Unposted”, “Cash Basis” and Breakdown setting when the report is run. If the Budget parameter is specified (as “A” or “B”), the budget is returned instead of the actual.

Examples:  L.GetMovement(periodOffset(CurrentPeriod(), -3), CurrentPeriod())

returns the change in ledger L’s value (movement) between the current period, and three periods before, for whatever ledger account L is referencing (which would be set in a preceding for loop).