Scheduled tasks on day of journal

I try that also but the list is empty. And is based on “today”. I like based on Journalpage Date.

I just take the code from above and change [(contains? #{"DONE"} ?m)]

#+BEGIN_QUERY
{
 :inputs [:query-page] ; lower-case name of the page the query is on
 :query [:find (pull ?b [*])
  :in $ ?page
  :where
   [?p :block/name ?page] ; this is always lower-case
   [?p :block/journal-day ?day]
   [?b :block/scheduled ?day]
   [?b :block/marker ?m]
   [(contains? #{"DONE"} ?m)] ; can use whatever state you want here, just an example
 ]
:breadcrumb-show? false
:group-by-page? false
}
#+END_QUERY

Now I get a list of all done Task with scheduled date from Journalpage date. But If I have a Task completed/done today with scheduled date yesterday then its not on
the list

Sorry, but I still don’t understand what you want to do.

  • One time you write “How can I change that to see all completed/done task from today?”
  • The other time you write “If I have a Task completed/done today with scheduled date yesterday then its not on the list”
  • What is “done task from today” and “done today with scheduled date yesterday”?
  • If you want to query the done date, it is not queryable.
    • Should manually add a reference to that date.

Hi mentaloid

Sorry for the confusion
I’ll try to describe more clearly what I need.

  • For the journal I have a template with the above query
  • My tasks are distributed on different pages
  • These tasks are displayed to me with the query, filtered to the day of the journal sheet, as “Tasks of the day”
  • If such a task is completed, it is removed from the list, i.e. I cannot see what I have done today. Especially those tasks that are on other pages.
  • I would like to have a query where the completed tasks are listed. And filtered by the date of the journal sheet (e.g. on the journal sheet from 16.5.2025 I see all completed tasks with completion date 16.5.2025. No matter when this task was planned. Only the completed date counts )

Do you have an Idea?

Thank you very much

Regards
Floonder

  • Cannot query completion/completed/done dates.
    • That is explained in the link I provided earlier.
  • The dates that can be queried are:
    • journal
    • scheduled
    • deadline
    • reference (to a journal)
    • property (depends on its format)

Thank you for the Info

Could this be an improvement?

Read again Add a done date to done tasks that is query-able

Hi
Is it possible to see the yesterday Tasks?

 :inputs [:-1D :query-page] ; lower-case name of the page the query is on

I add :-1D in the query, but I get an error
Query Error

Thank you in advance

Floonder

It is not enough to add :-1d. Should also match it with a variable in line :in (e.g. :in $ ?yesterday ?page) and normally use that variable in some expression.

Thank you for the hint. But I have no idea about create a query.

I try this one:

#+BEGIN_QUERY
{
 :inputs [:-1d :query-page] ; lower-case name of the page the query is on
 :query [:find (pull ?b [*])
  :in $ ?yesterday ?page
  :where
   [?p :block/name ?page] ; this is always lower-case
   [?p :block/journal-day ?day]
   [?b :block/scheduled ?day]
   [?b :block/marker ?m]
   [(contains? #{"TODO" "LATER"} ?m)] ; can use whatever state you want here, just an example
 ]
:breadcrumb-show? false
:group-by-page? true
}
#+END_QUERY

the result is empty, but there is a task from yesterday existing

Try something like this:

#+BEGIN_QUERY
{
 :inputs [:-1d] ; yesterday
 :query [:find (pull ?b [*])
  :in $ ?yesterday
  :where
   [?b :block/scheduled ?yesterday]
   [?b :block/marker ?m]
   [(contains? #{"TODO" "LATER"} ?m)] ; can use whatever state you want here, just an example
 ]
:breadcrumb-show? false
:group-by-page? true
}
#+END_QUERY
1 Like

looks great thank you.
Is yesterday’s date based on the journalpage date or on Today?

I try it also in the future (for Example +3d) not only in the past:
For example I would like to see all Tasks which are open based on the Journalpage date
Thank you in advance

yesterday, today etc. are all based on the date that a query actually runs, they don’t consider the current page or journal. Such information can be passed in :inputs as either:

  • :current-page for the currently opened page in the main pane
  • :query-page for the page the query is in

But these values are not dates and cannot easily participate in calculations. Therefore, there is no proper solution, only:

  • hacks that you can search for in the forums
  • custom code / plugins

Hi mentaloid

Thank you for the answer. That is very unfortunate.

regards

Floonder