How can I unite this two filters for results? I just want to collapse all sublines and filter my results by date at the same time
:result-transform (fn [result] (map (fn [m] (assoc m :block/collapsed? true)) result))
:result-transform (fn [result] (sort-by (juxt (fn [d] (get d :block/deadline) ) (fn [d] (get d :block/priority) ) ) result))
Welcome. To combine multiple transformations, should generally nest the first ones inside (as the result
input of) the last ones. In your case, something like this:
:result-transform (fn [result]
(sort-by
(juxt
(fn [d] (get d :block/deadline))
(fn [d] (get d :block/priority))
)
(map (fn [m]
(assoc m :block/collapsed? true)
) result)
)
)
Whether this is the result that you want, it is a separate matter. But it does the combination/unification and you can continue from here.
2 Likes
Thnx a lot! It works! Adding this idea to logseq)