How to Reference a Related User's Profile Photo on a Table

Hello!

I’m having difficulty referencing a related user’s profile photo for the purpose of displaying it on a table.

My primary data types are:
User (sub-type Customer & Provider)
Job

Customer Users create jobs.

The goal is to surface the job creator’s profile picture in a cell on a Jobs table. In the cell options, I select Search for Users and from there I expect to constrain the option to the creator of the job but there is no such reference.

I’m not sure whether I’m using the wrong type of query to fetch the photo or if I need to create a new reference field on the Job thing. I actually tried the latter but that didn’t seem to do the trick.

Thanks in advance for any guidance here!

@topjaba

Let’s assume the following dB model

customer
name (text)
users (list of users)

job
name (text)
jobCreatorUser (user)

user
name (text)
profilePic (image)

on the cell of an rg jobs use the following expression in an image elenent: current cell job’s jobCreatorUser profilePic

Having said the above … this would not be as performant as just keeping the image url saved as a text right inside the job so that the rg does not have to pull all jobs and all users in order to display the userImage

@cmarchan, thanks for responding. I should mention that I’m not using RG, I’m using the fairly new and native Table element. The expression you suggested doesn’t present itself to me.

I confess … I don’t know the first thing about tables. They are rather new and many folks feel that they are partially done. I have not yet used them so I cannot provide an educated opinion (I usually get on board with the new Bubble goodies when folks have tried them, tested and critiqued the heck out of them :sweat_smile:)

But … it is hard for me to imagine that one cannot build a simple expression like that … in a table that is.

Try replacing current cell with something that uses “parent”

Please share a screenshot of what you have … along with your dB model of the objects involved

1 Like

@cmarchan

Here are my DB elements:

USER
Screenshot 2024-01-16 124713

JOB

Jobs Table (only partially developed as I know I don’t have the data structured quite right). Note that the Job Headline keeps repeating the same headline whereas it should be listing every job.

@topjaba

@cmarchan

Right you are!

BIG THANKS to you for the guidance my friend :slight_smile:

1 Like