Default image for each row in Data Viewer

I’m using the Data Viewer connected to AirTable. It is working pretty good but I have a question regarding the image / title layout option. I would like to have a standard image assigned to each row. I realize the intended feature was to show specific images from URLs but I just want more of an icon next to each title. Now I can do this by hosting an image someplace and just assigning that url to each and every row but is there a way to use an uploaded image to handle this? I have the image added to the files section of my project. I can see that I can set up some options of the view in the blocks section but I have to do that for each row. I would like to have each row have the same image assigned to it that is stored in the files section of my project.

1 Like

This probably won’t work, but you can create a column in airtable that will hold a link to your image. When creating a row in a table, write a reference to this column as a variable

1 Like

That’s what I’m doing now. I have a column called image with a URL to the image that I want to use. I’m no assigning that URL to the image attribute for the viewer. It’s working fine but I have to find a place to host the image now and was just hoping to use the one stored in the app.

1 Like

строка со  ссылкой
примерно вот так

unfortunately, I do not see any other solution methods, but I think someone else will share their methods

1 Like

First add the image to your project.

Then do something like this


This code will assign the same image to all rows in the DVL.

The column name in the list of values block has to be ID.


Spot on my friend! Thank you

1 Like

Welcome. Glad to see my code helping others.

Of course you can enhance on it and have more than one image. Let’s say you want to show all products but those not currently available on shelf you want to show “Out of Stock” image others you want to show your shop logo. There are many ideas that can make your app seems smarter.

I agree. By using this method I can inject logic to control what image shows up. Very cool approach fro sure. It does exactly what I was looking for.

1 Like