obsidian-dataview icon indicating copy to clipboard operation
obsidian-dataview copied to clipboard

List all key/value pairs using DQL

Open rvzaytsev opened this issue 1 year ago • 4 comments

What happened?

Can't query inline fields.

DQL

In the current file I have a line key:: value when I run the following query I get an empty result.

LIST 
FROM [[]]

JS

No response

Dataview Version

latest

Obsidian Version

latest

OS

Linux

rvzaytsev avatar Oct 03 '24 17:10 rvzaytsev

Can you describe what you expected as result? An example file with example input for testing would be great.

Rubinum avatar Oct 15 '24 05:10 Rubinum

EDIT: Looking through the Dataview docs, I see that I might have misunderstood the [[]] reference, as it appears that's just for finding links in the current file. I suppose all I need is to specify my file's path! END EDIT

Running into the same problem here. Here's a small note that reproduces the problem and a screenshot of its render.

Note source:

---
foo: bar
---

```dataview
TABLE foo
FROM [[]]
```

Renders as: image

I haven't worked on Obsidian plugins before, but if I can figure out how to debug I'll see what I can find.

kgehmlich avatar Oct 19 '24 23:10 kgehmlich

I dont really get the point of this bug report. Do you try to find files with a certain custom property via a dataview query? If yes, please read the docs first before writing bug reports. Here is a example of how to find a file by a custom property:

Filecontent

---
foo: bar
---
```dataview
TABLE yo
FROM ""
WHERE foo ```

This content results into this grafik

If you want to look for files with a custom property and a specific value, look into this doc.

Rubinum avatar Oct 20 '24 08:10 Rubinum

@Rubinum the point is that I want to list all the key::value pairs. Use case: let's say I have some sort of collection of notes, e.g. a list of words with their definitions. I would like to list them all, and be able to sort in alphabetical order.

rvzaytsev avatar Oct 24 '24 16:10 rvzaytsev