Join the Webstudio community

Updated last month

Accessing Airtable Lookup Fields

At a glance
Hey all,
Dabbling with a simple database.
I have got as far as getting items listed and can access most fields easily. The issue is when trying to do a lookup field, I'm stumped.
e.g.
I have cards showing posts.
I want to show the thumbnail for the authors.
I add a collection within each of the items I've created for the posts which pulls data from [Collection Item.fields.author] and its pulling the data fine (gibberish string for record ID).

Now the issue is I can't seem to access the data from that linked record.
Any suggestions?
Attachment
image.png
K
O
J
4 comments
Okay, manged to partially solve by instead just pulling the reference field.
e.g.
collection item.fields.["image from authors]
However,
I want to have the images LINK to a url from the reference.

e.g.
<a href=AUTHORLINK>
<img src=AUTHORIMG>
</a>

And I can only pull the data for one into the parent collection.
If I connect to the "Author" reference field all it pulls is the ids in the array e.g.
[array1, array2, array3]
But I can't find a way to pull data from there for the image and link.

Can anyone help?
Bumping in case anyone else is working with Airtable and has had any other ideas!
can you post your data that you receive from notion? see inspector on the variable in the menu
You probably need to add a lookup field on the main table that pulls in the image url of the author. then its just available like regular
Add a reply
Sign up and join the conversation on Discord