Hi all,

Discovered that I could embed images into dataview and have been changing up a bunch of my index pages excitedly.

It works great with my gear list:

> [!tip] Gear list
> ```dataview
> TABLE
>regexreplace(file.folder, ".*\/([^\/]+)$", "$1") AS "Department",
> shows AS "Shows",
>embed(link(image, "125")) AS Image
> FROM "Knowledgebase/Video Production/On-Set/Equipment"
> sort file.mday desc
> ```

At the top of each ‘Equipment’ note I have the variables:

category:: Lighting
shows:: [[Show Name 1]],[[Show Name 2]]
image:: [[MoonLite by LumenRadio-1689061964287.jpeg]]

That works entirely as expected - I get a snazzy list of images down the dataview for each item.

However, it doesn’t work in this dataview, which is slightly different in the sense that it groups by ‘type’ - but even without the group-by clause it doesn’t work:

> [!Example] Devices
> ```dataview
> TABLE
> rows.file.link AS "Title",
> embed(link(rows.file.image, "250")) AS Image
> FROM "Journal/Entities/Devices"
> WHERE type
> GROUP BY type
> SORT type DESC
> ```

With these notes having these variables:

type:: Server
image:: [[Pasted image 20221026215500.png]]

I thought ‘rows.file.image’ is how I’d access the image this time around, but unfortunately not.

This works, but not when I try to group them and bring in information using rows.file.

> [!Example] Devices
> ```dataview
> TABLE
> embed(link(image, "250")) AS Image
> FROM "Journal/Entities/Devices"
> WHERE type
> SORT type DESC
> ```

Any thoughts?

5 points
*

Hey, have you tried the following?

TABLE
embed(link(rows.image, "250")) AS Image
FROM "Journal/Entities/Devices"
WHERE type
SORT type DESC

Placing rows. in front of image should fix the problem.

permalink
report
reply
3 points

YES. 🙏

That works, can’t believe I didn’t think of that. Thanks!!

permalink
report
parent
reply
2 points

Happy to help! Glad it worked out.

permalink
report
parent
reply

Any chance you could put together a mini-example vault to help troubleshoot on?

permalink
report
reply

ObsidianMD

!obsidianmd@lemmy.world

Create post

Unofficial Lemmy community for https://obsidian.md

Community stats

  • 44

    Monthly active users

  • 148

    Posts

  • 820

    Comments