Advanced Obsidian Dataview Hack: Auto-Link Meetings to Companies (less metadata!)

Поділитися
Вставка
  • Опубліковано 23 гру 2024

КОМЕНТАРІ • 11

  • @stevewebster9676
    @stevewebster9676 Місяць тому

    Hi. Really good video as usual but wanted to ask a question. Having set this up, and it works just as described I get multiple entries in the table for the company if there is more than 1 participant from that company attending, do you have a work around for this?

    • @construct_by_dee
      @construct_by_dee  Місяць тому

      You found a “consideration” point that I missed!
      I spent a couple of hours trying to change the code to remove the duplicates - no luck.
      Will get back to you once I have code that fixes this!
      Thanks for informing me 🙏

    • @construct_by_dee
      @construct_by_dee  Місяць тому

      Free membership to whoever solves this puzzle 😉

    • @construct_by_dee
      @construct_by_dee  Місяць тому

      After countless hours I finally got the code to fix this bug! 🥳🥳🥳
      Here you go:
      ```dataview
      table
      max(rows.created) as "Created",
      join(unique(rows.participants), ", ") as "Participants",
      join(unique(rows.participantLinks.company), ", ") as "Companies"
      FLATTEN participants as participantLinks
      WHERE contains(tags, "#type/meeting")
      AND contains(participants.company, this.file.link)
      GROUP BY file.link
      SORT max(rows.created) ASC
      ```

    • @stevewebster9676
      @stevewebster9676 Місяць тому

      @@construct_by_dee Hi, that’s great and sorry to trouble you. Many thanks for the all you effort

  • @hubertuswasmer348
    @hubertuswasmer348 Місяць тому

    Hi, interesting hack, can you give an info or your thought what happen when the Person is changing the company? Do we see then still all the meetings at the right place or old meetings at a new company? And your videos are really good explained.

    • @construct_by_dee
      @construct_by_dee  25 днів тому

      Hi there.
      That is a limitation of this functionality for now.
      I would build in another property for "past companies". Will try to find code that might work for this.

  • @user-he5nd1bs3q
    @user-he5nd1bs3q 2 місяці тому +4

    Until Alice moves companies then everything is fked.

    • @piff57paff
      @piff57paff 2 місяці тому +1

      Was just about to call that out. Same goes with enterprises and people switching teams within them.

    • @construct_by_dee
      @construct_by_dee  Місяць тому +2

      Yes, that was one of the considerations mentioned in the video.
      This example was the simplest way to demonstrate the functionality, though I hope people can find even better use cases for it.
      One that comes to mind is for writing novels. For instance, imagine a character belonging to a specific race (elves, dwarfs, humans, etc.). This might be a more fitting example since a character's race typically doesn’t change. Using Dataview queries, you could pull up all scenes featuring dwarfs without needing a separate metadata field like 'races in this scene.' Instead, it would indirectly retrieve it based on characters listed in the 'character' metadata field.
      If you have any ideas, I'd love to hear them! ;)