logseq / logseq/logseq

Query table function cannot work in whiteboards

Open
#9,745 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

🎨 :feat/whiteboard can-be-reproduced query
Dominant language
Clojure
Stars
45k
Forks
2.8k
Avg merge
1d 22h
Merged PRs (30d)
105

Description

### Search first

- [X] I searched and no similar issues were found

### What Happened?

created a `Advanced Query` with some properties.
Then created in page/journal and whiteboards, both display the correct results with that `Advanced query` . And then create a query-table function after query , only work in page/journal.

### Reproduce the Bug

create query both in page/journal and whiteboards like this
```
query-table:: true
query-properties:: [:block :date :price]
#+BEGIN_QUERY
{:title [:h3 "近7天某类别花费"]
:query [:find (pull ?b [*])
:in $ ?start ?end
:where
(property ?b :tags "娱乐")
(between ?b ?start ?end)
]
:inputs [:-7d :today]
:collapsed? false
}
#+END_QUERY
```

After that, created a function to get a subtotal of price like this
```
{{function (sum :price)}}
```
only display correct results in page/journal, whiteboards throw error.

### Expected Behavior

_No response_

### Screenshots

Screenshots in page/journal
![page-function](https://github.com/logseq/logseq/assets/45123712/7de844ee-978f-49b7-bf3e-6631b949cbf7)

-------

Screenshots in whiteboards
![page-function-3](https://github.com/logseq/logseq/assets/45123712/4c7d7fcc-627b-4de5-968f-85975adb7be1)

### Desktop or Mobile Platform Information

Using Windows **Logseq** in version 0.9.9

### Additional Context

_No response_

### Are you willing to submit a PR? If you know how to fix the bug.

- [ ] I'm willing to submit a PR (Thank you!)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No source file, test, or entry point is named. Reproduce the query-table function in a whiteboard and compare it with page/journal behavior in Logseq 0.9.9; done means the subtotal renders without an error in whiteboards as well.

Written by the indexing model from the issue text.

Assessment

Tech stack
clojure
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.