Hi, I need help in a simple query that is driving me crazy
I work in a company where we have a system for Service Orders.
A service order is it’s ID + ITEM ID, for example: 844746/2, where 844746 is the service order ID, and 2 is the Item ID.
I made a query to bring all notes from the service order, excluding the item:
{
:title [:h2 "Anotações - Ordem de Serviço"]
:query
[
:find (pull ?b [*])
:in $ ?current-page ?parent-page
:where
(page-ref ?b ?parent-page)
[not
(page-ref ?b ?current-page)
]
[not
(page-ref ?b "acompanhamento")
]
[not
[?b :block/marker _]
]
[?b :block/content ?c]
[not
[(clojure.string/includes? ?c "tags::")]
]
]
:inputs [:current-page "844746"]
:table-view? false
:breadcrumb-show? false
:collapsed? true
}
How can I get the ?parent-page
without “hard-coding” it? I want to use this query as template for all my service orders.
Sorry for my english, I can provide further info if necessary.