See the stars and reviews

Hello,
I followed Robert Petitto’s video on the possibility for users to give a review using a star system, from 1 to 5. Here’s the video: https://www.youtube.com/watch?v=CZkIcLXui10

What I want is for the stars to appear on my DB games and not a review, but I don’t know how to do this? Because at the moment, when people post a review, it’s in a closed and limited tab.

This screen is DB Games

And this screen is DB Review

What I want is for the “Your Rating” to be on the screen with the DB Games and not the DB Review.

What does “DB Games” mean in your context? Do you mean you want to show an average rating for each game, or show the rating the signed-in user has made for the game they’re viewing?

my DB games is there to display the games you click on with all your information. It’s also on this screen that all the information is displayed, and I think that’s where I should put the stars.
I want to display the number of stars attributed by the users, I don’t want the average, that’s what I did with the video.

Where and how is each users rating saved?
Depending on how, it might be as simple as collection filtered by signed in user, or you might need a relation & lookup based on signed in user. Can’t say exactly without knowing how the ratings are stored.

It is registered with DB Ratings → Rating

Cool. Okay, the following should work:

  • In your DB Games table, create a Query column. Target it at your Ratings table and apply the following filters:
    — UserID is User Profile → UserID
    — GameID is This row → GameID
  • Then add a Single Value column that targets the Query column and select the first Rating value

You should then be able to use that value on the DB Games details screen.

1 Like

I followed your tutorial correctly and everything is displayed correctly in the DBs, but it doesn’t show up on the application display :confused:

image

Are you viewing it whilst signed in as a user that has rated that game?

If you’re not signed in, or if you haven’t rated the game, then you wouldn’t see it.

Yes, I’m connected

What if it were now possible to enter a rating directly into DB Games, which would then be sent to DB Ratings?
Because what I like about DB Ratings is that it has a star display (it detects if someone has put a rating of 3 = 3 stars) and there’s also an average which I really like.

“Game score” its the average
image

Not sure I understand what you’re asking there. Do you want the user rating to be stored in the DB Games table, or do you just want to add a row to the Ratings table from the context of the DB Games detail screen?

The stars are just a relation and lookup, right? You can have the same thing in your Ratings table.

I’d like the number of stars I’ve put on a game to be displayed on the screen so that I don’t have to click on “Modify your review” to see how many stars I’ve put on a game.
For example, I click on Minecraft and I see that I’ve put 4 stars on the game and I don’t need to go down and click on Modify your review and then only see the number of stars I’ve put on that game.
However, I’d like to keep the option of seeing the stars I’ve put in the review a little further down the screen (you can see the username, the number of stars and the comment I’ve left). And see the average of all the stars in “Game Score”.

Sorry, it’s a bit complicated to explain.

I prefer this :

And not this :

You want the user to be able to modify their rating directly without opening the form? (eg. by just clicking on the stars?)

Yes!
But keeping the averages we see in the Game Score and keeping the number of stars that users put in the review

the average :
image

the review :
image

Sorry, but I’m getting a bit lost here.

Aren’t the averages calculated based on all user ratings?
So if any user changes their rating, then logically the average must change - right?

Anyway, to modify it directly - that’s something I’d have to play around with. Essentially you’re wanting an input component (Ratings) that modifies a value in a different table to the one the screen is attached to. I’m thinking that what you will need is a Custom Colection that just contains a Ratings component, and then filter it so that it only shows the row from the Ratings table that corresponds to the current user/game combination. Actually, you can probably use that Query column that we created earlier as the source of the collection. Give that a try, I suspect it will work.

1 Like

What’s strange is that everything works but it’s not displayed. It’s as if you have to enter the number of stars you want for it to be displayed, but if you enter a number beforehand in the DB and link it to the Rating, it won’t be displayed.

Can you show some screenshots of the actual data structure you’re using related to your latest comment? I don’t see how Darren’s suggestion would not work.

Hi!



So “RatingNbr” is the rating of the current user?

What does “GamesID → Row…” do?

The RatingNbr is " * Then add a Single Value column that targets the Query column and select the first Rating value"

I would do it like this:

  • If RatingNbr is empty then show a form container that allows the user to submit a rating to the Ratings table.

  • If RatingNbr is not empty then show the Custom Collection that Darren suggested.