Star Rating components doesn't work with database

Hi Guys!

I have a problem with star rating component.
I created database “ratings” as recommended in other posts, but when I want to choose “What property does it set” I cannot choose Ratings, only logged users is available.
Pls help :slight_smile:


Hi @wojcikiewicz.d,

Welcome to the community :partying_face:

Before coming to that screen you need to create a Rating record. I think before this screen you have a button that coming to this screen and add a create action and select the collection ( Ratings ) and then add the link action. And you can add the Delete Current Rating action to the cancel button and Update Current Rating action to the share button.

Thank you

Hi @dilon_perera
Thanks! Now I can see “rating” and I can choose it. Thanks for help

I have one more issue which I’ve been struggling for last 3 days :smiley:
I have the users and festivals (connected to Ratings database). One user can rate each festival. In preview as a user I can rate the festival and then go back and again rate this festival. Its like the previous rating haven’t been saved.

1 Like

Your Welcome!

In your Ratings collection add a relationship property One to many not the Many to Many. Delete that many to many relationship ( Users ) and create a One to many relationship between Users.

And In your Update action add Logged in user there. And then I think you have a button that like Rate and when you click that it’s coming to this screen right?

Then you can add a visibility condition to the button ( three dots>visibility condition) and add Current Festival>Ratings>Count is equal to 0. And then add a filter that Current Rating>Creator’s ( one to many relationship)>email>is equal to>logged in user’s email.

Thank you

Thanks @dilon_perera Changing the relationship helps.
But about this
“Then you can add a visibility condition to the button ( three dots>visibility condition) and add Current Festival>Ratings>Count is equal to 0. And then add a filter that Current Rating>Creator’s ( one to many relationship)>email>is equal to>logged in user’s email.”

You’re right, I have button RATE before this screen, but I would like to give user possibility to change the mind. So hidden this button while festival is rated is not a solution.
For example - I rated 5 starts the festival one week ago and today I change my mind so I would like to rate for 4 stars. When I open screen with stars I can see those 5 stars rated one week ago, but now I make it 4 stars. Otherwise I may not remember how much stars I gave

You can add another button and make it a list ( three dots>make a list ) and connect it to the Ratings collection and add the filter as Current Festival> Ratings and add a custom filter that current ratings>creator ( one to many relationship )>is equal to>logged in user’s email. And set the maximum number of items to 1 in the list.

And then add another screen and add a link action to that button ( Add the link action to the button not for the list ) to go to that screen and add the ratings component,a input component and a button to that screen and set the ratings component current rating>ratings ( number property ) and add the default value of the input as current rating>comment.

And add a Update action to the button and add the Input’s name to the comment field in your Update action and add a link back action.

And make that two buttons touching and group them.

I have been “fighting” for 4 hours but for nought. Can you record this or make a screenshots?

it works!! Thank you very much

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.