Meta
up:: π§ͺ Code Diary
type:: #log/code
tags:: #on/snippets
language:: Dataview
program:: Obsidian
topics:: Coding
Get list items with a tag and display without the tag
Language:: Plugin - Dataview
Program:: Obsidian
URL:: Reddit - Dataview Lines with Tag
Summary
Use dataview and regard to get and show items with a tag
Code
TABLE WITHOUT ID string(link(rows.file.link, rows.title)[0]) AS class, regexreplace(list(rows.L.text), "#exam", "") AS "exam"
FROM "3_semester"
FLATTEN file.lists AS L
WHERE contains(L.tags, "#exam")
GROUP BY file.link
Explanation
I use this snippet to list lines tagged with β#examβ in my folder "3_semester", which I adapted fromΒ this discussion. To show the tag too just remove the regexreplace().
Result
class | π₯ |
---|---|
Blindsight |
|
The Dawn of Everything |
|
up:: π§ͺ Code Diary