How to style the self-link in the result of a query differently?

You have a note name Activity 1 containing these metadata:

task:: [[task A]]
task:: [[task B]] 
task:: [[task C]]

The order of the list implies the order of the tasks. And in note Activity 2 you have:

task:: [[task X]]
task:: [[task Y]] 
task:: [[task B]]
task:: [[task Z]]

So in task B if you use this dataview query

list task where contains(task, [[]])

then you will have a list like this (all items are links to the notes):

- Activity 1
 - task A
 - task B 
 - task C
- Activity 2
 - task X
 - task Y 
 - task B
 - task Z

This is useful to see the entanglement of the tasks in the activities. Task B is depend on the complement of task A, X and Y, and is the input for C and Z. If there is a way to emphasize B in the lists, then it would be great.

Related topic:

I feel like mnvwvnm answer in discord is the solution. no?

LIST WITHOUT ID choice( =, "**" + + "**",

It took a while to find the solution, but I think this works:

list map(task, (t) => choice(t = [[]], "**" + t + "**", t))
WHERE contains(task, [[]])

@efemkay this case is more complicated because in the discord solution the target is the (a single value) and in the case the target is a specific value inside an array of multiple values.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.