Hello !
What I’m trying to do
I would like to make dataview display in a column values according to criterias I would have set. The general idea is “if criteria X is met, then display Y”
For example :
My table would display two types of notes.
- Notes containing the tag “#summary”
- Notes containing “#research”.
I can easily select them with FROM #summary or #research
That is a summary
#summary #tag2 #tag3
{content of the note}
That is a research note
#research #tag2 #tag3
{content of the note}
What I would like to is creating one column displaying “summary” if the note contain the tag #summary and “research” if the note contain the tag #research.
Table of research notes and summaries
Title Type That is a summary Summary That is a Resarch note Research
I would like to understand how to do that with several situations.
For example :
If the value of a key is <5, then display “Yes”. If the value of a key is >= 5, then display “No”.
Or when “priority = 3” then display “”. When “priority = 2” => “”. When 1 => “”
Things I have tried
- Reading all the dataview functions
- files.tags doesn’t do what I want as it display all the tags of a note, and I would like to learn how to make a “if x then display y” rule, if possible.
- An alternative option would be to create a key on all #Research and #summary notes. For example making bulk replacement with Visual Studio Code of “#research” by “Type :: #research” and “#summary” by “Type :: #summary”. So I would be able to display de column “Type”. But again, I would love to learn what I’ve explained above.
How could I do that ?