Trouble with "joins"

Hey Everyone - Only been working in bubble for the last month or two and could use some help. So I’ve got a table called movies which is in a repeating group. Users can mouse over it and rate each movie, and I’d like to store that in a separate table called ratings. I’m getting stuck because I’m getting caught between type show and type ratings. I started off by having the rating input create a new thing in ratings that saves the show, the rating (and the user who created it by default). But the user could also update their rating in which case it would be a changes to a thing, so dont know how to write that conditional so it does a change to a thing if it finds a value for that show for that user in the ratings table. And furthermore, I would like to show the rating and am trying to sort out how to pull the rating for that show for that user from the ratings table and create a conditional rule around it… Any advice would be super helpful. I’m including snips of the tables…


Rating needs field for movie and field for user, which can be built in field of creator.

Search ratings with constraints creator is current user and movie is current cells movie

hey boston - are you suggesting I create a user field in ratings in addition to creator? And in order to search ratings, doesnt this have to be a type ratings? and if its a type ratings, I dont know how it pulls the show info. Thats’s where I’m getting spun around.

For this use case, no, that is not necessary as the ratings will only ever be created by a logged in user.

This being rating? Yes, it would need to be of the data type rating.

Use the related field of movie

gotcha! So i put the icons in another container and set that container to type ratings, leaving its parent as movie. I guess i didnt think I could do that for some reason. And then did this and its all working swell. Thanks for the brain bump Matt! You da man.

1 Like