Linking Data from External Note into a Dataview Table

Things I have tried

I’ve gone through DV documentation and am a DAILY reader of this Help channel. I fear I may need DVJS for this but am not sure…

What I’m trying to do

I take notes at work meetings, during which I record attendees (who:: @Person1). I can readily make a table of my Contacts and the date of my most recent interaction. My code:

Table
	rows[0].file.ctime AS "Last Interaction"
FROM ""
SORT ctime DESC
GROUP BY Who

What I’d LOVE to do is only include Contacts who are ‘important’, as defined within each individual contact’s page. (Every contact has their own page [@Person1] with a field titled ContactRank. Choices are ‘important’ or ‘normal’). Is it possible for the DV table to reference this information somewhow ?? I hope I’ve explained clearly and appreciate the help !!

Topic

Summary
  • How to link the data from the external note into a Dataview table?

Test

Summary
  • dataview: v0.5.55

Input

Summary

dictionary files

the Contact notes

  • Location: “100_Project/02_dataview/Q16_Links/Q16_test_data/Contacts”

  • filename : @Person1
---
ContactRank: important
---


  • filename : @Person2
---
ContactRank: important
---


  • filename : @Person3
---
ContactRank: normal
---


the Attendee notes

  • Location: “100_Project/02_dataview/Q16_Links/Q16_test_data/Attendees”

  • filename : dic_19930301
---
Date: 1993-03-01
---
who:: @Person1



  • filename : dic_19930401
---
Date: 1993-04-01
---
who:: @Person2



  • filename : dic_19930501
---
Date: 1993-05-01
---
who:: @Person3



DQL10_link_data_from_external_note_into_a_Dataview_table

Summary

Main DQL

Code Name Data type Group By Purposes Remark
DQL10_link_data
_from_external_note
_into_a_Dataview_table
any yes 1.To filter by link(who).ContactRank
2.To sort by file.ctime in descending order
3.To group by Who
4.To display the result as a table

DQL10_link_data_from_external_note_into_a_Dataview_table

Summary_code
title: DQL10_link_data_from_external_note_into_a_Dataview_table =>1.To filter by `link(who).ContactRank` 2.To sort by `file.ctime` in descending order 3.To group by `Who` 4.To display the result as a table
collapse: close
icon: 
color: 
```dataview
TABLE WITHOUT ID
      rows.file.link AS "File",
      rows.who AS "Who",
      link(rows.who).ContactRank AS "ContactRank",
      dateformat(rows.file.ctime, "yyyy-MM-dd HH:mm:ss") AS "Last Interaction"
FROM "100_Project/02_dataview/Q16_Links/Q16_test_data/Attendees"
WHERE link(who).ContactRank = "important"
SORT file.ctime DESC
GROUP BY Who   

```

Screenshots(DQL10)


Hey JustDoIt - This is supremely helpful. Thank you so much…contains a concept I hadn’t come across before. For anyone who tries this, adding [0] after ‘rows’ will show only the most recent interaction. (ie: rows[0].file.link AS “File”…)

1 Like

Anytime!
Many thanks for your question. It has benefited me a lot.

(i’m just a wealth of inciteful ignorance !)

1 Like

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