From 7b7f6c904ce22014070ca68bbc3eb587ac59090c Mon Sep 17 00:00:00 2001 From: Robert Dyer Date: Mon, 23 Dec 2024 08:34:45 -0600 Subject: [PATCH 1/2] Add example of orderBy with a descending order (#583) This adds an example to show how to change the sort order. --- docs/api/actual-ql/functions.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/api/actual-ql/functions.md b/docs/api/actual-ql/functions.md index cf4b0a151..6def3045c 100644 --- a/docs/api/actual-ql/functions.md +++ b/docs/api/actual-ql/functions.md @@ -23,6 +23,15 @@ q('transactions') This returns transactions with an income category sorted by category name. You can also pass an array to `orderBy` to sort by multiple fields. +You can also change the sort order by specifying either `asc` or `desc`: + +```js +q('transactions') + .filter({ 'category.is_income': true }) + .select('*') + .orderBy({ 'category.name': 'desc' }); +``` + ## Aggregate Functions You can specify aggregate functions in `select` for things like sums and counts. An example: From b704fbbf7c5c847d6b9f2ffa7a70bb26b13f4e1d Mon Sep 17 00:00:00 2001 From: Kai Chevannes Date: Mon, 23 Dec 2024 14:40:58 +0000 Subject: [PATCH 2/2] [WIP] fix envelope budgeting numbering typo (#584) 4 was duplicated, changed second occurrence to 5. --- docs/getting-started/envelope-budgeting.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/getting-started/envelope-budgeting.md b/docs/getting-started/envelope-budgeting.md index d4885f668..e2cfc99be 100644 --- a/docs/getting-started/envelope-budgeting.md +++ b/docs/getting-started/envelope-budgeting.md @@ -211,7 +211,7 @@ you understand that budgets are not rigid constraints but flexible tools that ca -### 4. Prepare for the unexpected +### 5. Prepare for the unexpected There’s no such thing as a "normal" month when it comes to expenses. Your costs fluctuate throughout the year, often unpredictably. Envelope budgeting helps you prepare for these irregular expenses by adding funds to