I’m working on a Repeating Panel that displays text values from rows in a data table. In this same data table, I have a column that contains text links to URLs of images. Each row of data contains a URL link to a different image.
I’m trying to programmatically display each image link as an image in the Repeating Panel (as the image source) combined with the text that’s bound from the data table, but I’m not having much success.
There’s a tutorial for a News App here, but the image that’s displayed is stored directly in the data table. For my purposes, it makes more sense to store the text URL link of each image instead of storing the actual image in the database.
Can anyone point out a way I can dynamically display the images from the text URLs stored in the database?
Ah, I realize my issue was that I was storing relative paths to the images in my DB and trying to add the URL domain name to them in the code after the fact. This was complicating things unnecessarily. Once I stored the full URL into the DB, Anvil displayed things perfectly.
Didn’t seem so obvious when I was working on it, but it’s so simple in hindsight. Thanks for your suggestions and help.
For anyone visiting this thread and wondering about this, I made a barebones demo code of a Repeating Panel showing images that are stored as text URL links in a data table instead of the images being stored directly in the data table. You can clone it here:
You’re welcome. Sometimes all it takes is to ask your question in a public forum and you find your own answer! I came across the term Rubber Duck Debugging recently which made me chuckle!
I’ve been asking my kids to be rubber ducks since they were little. I’m pretty sure they knew about rubber duck debugging before they ever saw an actual rubber duck!
(Favourite line from one of them being “Dad, explain it to me like I was 5.” When he was 8).