Dataview query table not displaying all the data

I am trying to query the projects from “Projekte” folder.
My first approach was to list the folder names inside the folder “Projekte” but I couldn’t do it.
I always got only the Files inside the Folders.

Now I tried with the query:

TABLE WITHOUT ID Projekt, Status, Priorität, Enddatum, Erstellt
FROM "Projekte" 

I get a response but the table gets filled with empty spaces.

Is there a way to either list only the folder names inside the folder “Projekte” or to remove the empty spaces and add a link to the Projects so when I click on it I get redirected to the Project folder?

This is my structure:
image

Any use?

```dataview
TABLE
WHERE contains(file.folder, "Projekte") 
GROUP BY file.folder
```

```dataview
TABLE rows.file.link 
WHERE contains(file.folder, "Projekte") 
GROUP BY regexreplace(file.folder, ".*\/([^\/]+)$", "$1") AS Folder
```

Source: Obsidian forum

1 Like

Thanks @anon63144152 . The first approach is almost what I need.

I also want to integrate the Status etc.

I tried it like this, but sadly the Data doesnt get displayed.

```dataview 
TABLE rows.file.link AS Projekte-Doku, Status, Priorität, Enddatum, Erstellt
WHERE contains(file.folder, "Projekte") 
GROUP BY regexreplace(file.folder, ".*\/([^\/]+)$", "$1") AS Projekt```

The data Status,Priorität,etc is stored inside the files from a projekt, in this case under “Roadmap”.

1 Like

Wish I knew the answer to this. Perhaps flatten would help with the missing data. Unfortunately I am well beyond the limits of my own use and knowledge.

Hopefully someone else can help; you really need someone like holroy who wrote the post I linked to originally — a Dataview genius.

1 Like

Hello.

I tried your original query and did not see any empty spaces. Do you know what causes them to appear?

---
Projekt: Marketing Migration auf CDM
Status: Begonnen
Priorität: Wichtig
Enddatum: 31.08.2023
Erstellt: 20.07.2023
---


```dataview
TABLE  
Projekt, 
Status, 
Priorität, 
Enddatum, 
Erstellt 
FROM "Projekte"
```


`$=dv.span(dv.current())`


EDIT

Could it be the empty spaces come from empty keys in some notes, something like this:

---
Projekt: Marketing Migration auf CDM
Status: Begonnen
Priorität: Wichtig
Enddatum: 31.08.2023
Erstellt: 20.07.2023
---

```dataview
TABLE  
Projekt, 
Status, 
Priorität, 
Enddatum, 
Erstellt 
FROM "Projekte"
WHERE Projekt != null
```

```dataview
TABLE  
Projekt, 
Status, 
Priorität, 
Enddatum, 
Erstellt 
FROM "Projekte"
```


`$=dv.span(dv.current())`

These are the folders and files for the above:

Projektetest.zip (4.5 KB)

I dont really know why the fields were empty for me.

I changed my approach and just fixed it by not using folders anymore but create a single file for each project.

For now its more than enough.

I will save your approach for the future in case that I decide to change to folders for each project instead of using a file.

Thanks for you help and your time in detailing everything :smile: .

1 Like

Great to hear you have a solution that works for your needs. Wish I could have done more.

:wave:

Whenever you add a GROUP BY clause anything previously available as fieldname becomes available as a list through rows.fieldname, and the original field is unavailable (or empty as you put it).

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.