Problems pulling a url for an image from my database?

Hi All,
Newbie question again I'm sure - sorry.
I'm trying to pull a url from a query, which queries a column in my postgres db - and then use this url to display in image (image component).

I'm missing a step somewhere, i think - because I can not pull this url.

  • The query works - and gives me the url
  • The url seems to populate in the image source url field when inspecting it (see below)
  • The url works on it's own (when I paste into the URL field instead of some code).

However; It's not displaying the image. It gives an undefined error for the query....

I'm sure this is something simple, any help is appreciated. I checked all similar /previous posts on here regarding url/images - but it didn't give me any new insight.

I don't see the result of the query but here is what I have done....

1 Like

Hi ScottR - once again, thank you for your valuable help. This worked.

Can you tell me what the index /0 - does? (again, sorry for my rudimentary questioning here).....

thanks again,

From a simple and basic view; the index is included because that's the result of the query and there is no name/value pair in the result. You could change it by using a transformer in the query panel using return data.matrix_url[0] and then simply add in the url field, but I would suggest you get the basics down first. And there is another way to write the query without needing the index, but again, if it works, great and you can always go back to it later on and change it.


aha ok, so buy adding the 0 we are saying give me the first set(column) of data and nothing else? (even although there is nothing else).


1 Like

This really is all new to me.
Years ago - i used to make databases for myself using MS Access /VBA - and always wanted something 'close' to that - came across retool - and have been spending the holidays getting my head round it.
But I've also had to learn all about AWS, databases (in the cloud!), and coding these database - and retool.

Your help has been great, thanks again.

1 Like