Using dataview I am trying to make a table where it returns all the sub-topics mentioned in a note. However, because one of them is in every note I don’t want it to return every time. So I took the ‘topics’ object, made it a string and replaced the re-occurring topic.
TABLE WITHOUT ID
file.link AS "Inputs about Productivity",
split(replace(string(extract(file, topics)),"[[Productivity & Productive Skills]] –", ""), "–") AS Sub-Topics,
FROM "3.Inputs📥"
SORT file.name ASC
The problem is now the topics that do return in “{}” and I don’t know why?
And in fact, it’s the extract() which introduce the braces, so use the above, and it seems like your issue is solved.
Alternative syntax
I would consider doing something like:
topics:: [[topic a]], [[topic b]], [[topic c]]
This would make topics a proper list of links, instead of just a string, which then would allow for creating the subtopics using filter like in the following column definition:
filter( topics, (f) => f != [[topic a]] ) as Subtopics