Call a random image from a table

Hi Gliders, I’m stumped. My app creates a text document using AI then uses that text content to call images from the Pexels integration and it works really well but I now have a client who only wants to use their images. I have a table that has all the images uploaded but does anyone know when I make a new row in the master table, how I could call a random selection from the image table? I’m at a loss , Thanks as always :slight_smile:
Laz

Do you have a column in the images table that identifies the images for that client?

@Darren_Murphy Do you mean like a name column? I could if I needed

Yes, anything that identifies the client that the image “belongs” to.

Just to be sure I understand correctly, are you able to show me screen shots of both tables?

@Darren_Murphy


So the first shot shows the content output the Ai wrote and I would like to put and image URL (randomly) from this table

![Screenshot 2024-12-06 at 8.32.59 PM|690x198] Kinda like I’m just using it as a drive folder (upload://7iPnqMsjtNxPIaqiLJx2dyV4a8A.jpeg)

So rows are added to the first table by your users?

What I would do is add a column to that table that identifies the user that generated the image, probably their email address. Then what you could do is add a Query column to the second table that targets the first table, and filters by signed in user. You could then use Single Value->Random to fetch a random image via the Query.

Note: I’m not 100% sure I fully understand, so my suggestion could be off…

1 Like

@Darren_Murphy Hey thanks so much, (sorry for the delay in replying) no, that makes perfect sense, I’ll give that a go, like everything with this type of thing it’s like, oh yeah, give it that type of information you can work with and that will get you access to what you’re trying to do, just needed a more experienced set of eyes to see that, thank you man, I’ll give that a go and report back :slight_smile: