Hi @jmm, I think I chose a slightly different approach to this.
Instead of putting the abstract in its own section, I put it in an inline field under the title, like this:
abstract:: here goes the abstract/summary of the paper
The advantage is that since it’s an inline field, you can invoke it very easily from dataview; my table looks like
```dataview
table abstract as Abstract
from #project
sort author asc
The disadvantage is what’s above: seems like the default line length for the dataview table is capped at 500 characters. The good news is that that seems to be modifiable (per @Surjaa’s link to the discord thread; you can edit the plugin and increase this size, although will have to do it every time it updates. I haven’t experimented with this yet, so this is just based on the discord thread).
I like your approach too, but I’m really not very fluent in dataview yet so would have to experiment to see how transclusions work in it if they do.
I’m trying to build a list of notes grouped by the values of either a sub-tag or YAML value. Either route is fine if one is possible and the other is not.
I have front matter like this:
---
technology:
- Go
- PHP
---
And tags like:
#technology/Go
#technology/PHP
#technology/NodeJS
And I am looking to make a table like this:
Go
Name
Creation Date
File with Go tag 1
June 1, 2021
File with Go tag 2
May 26, 2021
PHP
Name
Creation Date
File with PHP tag 1
June 1, 2021
File with PHP tag 2
May 26, 2021
This dataviewjs gets me close:
for (let group of dv.pages("#product").groupBy(p => p.product)) {
dv.header(3, group.key);
dv.table(["Name"],
group.rows
.sort(k => k.rating, 'desc')
.map(k => [k.file.link]))
}
But I have two problems
In my example, I’m using a mix of tags (find pages with #product) and frontmatter (group by product). I’d rather use either tags or frontmatter.
Several of my notes have multiple product values. If my product array is [“Pencil”, “Pen”] I’ll get a grouping of “Pencil, Pen” not a section called “Pencil” and another called “Pen”
Thanks. Your approach is cleaner and I would like to implement it if I knew how to make an inline field collect text from several paragraphs or list items. I have tried backslash, \, at the end of each paragraph or items in a list, but that’s not it.
The option to add line breaks, <br>, within a single paragraph, although it solves the rendering of new lines both in Dataview and in Obsidian preview, compromises the readabilty of long lists in Obsidian Edit view.
Yeah, that’s a good point, and I have not tried yet to experiment with that too much; my abstracts are just paragraphs. But you’re right that lists could be helpful.
Instead of fiddling with non-standard “inline” stuff you can as well put your multi-paragraph abstract into the YAML frontmatter—a practice Pandoc/LaTeX users have used since ever so many years.
Note: When using this format, each new paragraph in the abstract must start with a blank (which won’t show in the output).
To better illustrate this, I’ve switched on “Show whitespace” (so you see the blanks) and made screenshots of both edit and preview mode:
@Rishi I thought this so unbelievable that I never tried it … And guess what? Dataview tables can really be “just copied” from preview mode and pasted into LibreOffice Calc. Fantastic.
Yeah, thinking of complex things often makes us forget that simpler things do work too!
The reason it works, I believe, has nothing to do with Dataview or Obsidian but just that the preview render is HTML and almost all spreadsheets can paste tables from webpages.
Afternoon all - just a quick question from a relative noobie to Dataview that I was hoping someone might be able to help with.
I’ve started fairly simple by creating an MOC for podcasts that I listen to. Just a simple:
```dataview
table author
from #podcasts
That brings up the information nicely. However, in my head, clicking the name of the podcast would take me through to the page for it that already exists in my vault. Only it doesn’t, it creates a new (blank) page for me.
Is there a way, where I can re-direct the click through to the page that already exists rather than creating a new one?
@Melaniew@MortimerJazz I don’t wish to offend, but such questions should better be asked in the “Help” section, for others to find and respond to. This is the “Showcase”.
The multi-paragraph text I now would like to be able to access is rich in links, and these are not updated when the target note is renamed nor can they be hoovered over.
However, I can think of some other uses for multi-paragraph values in yaml. Thanks for your clear reply and example.
You might actually want to just create a new post in the “Help” category. When you start a new topic, you get to pick the category from there. This also helps other people quickly find solutions if their problem is similar.
If I remove the brackets, removing the link to my daily template, then it sorts fine but dataview adds day to the date making 2021-06-09 look like “wo 9 jun. 2021”. I don’t like that.
Does anyone else has this issue or perhaps even the solution?