Rating component

Hello people.

I need some advice in regards to the rating component.

I’ve never used it before but I think it will work well with a project I’m working on at the moment.

Ive used the data list viewer component using a Google sheet spread sheet as the data source.

If I add a ratings column to my sheet and bind that column to my list within my app does the ratings automatically just up date (through my Google sheet) as my users enter their ratings? Or is it a bit more complicated and I’ll have to use some blocks?

Hope that makes sense.

Cheers in advance.

You would have to update the Google sheet data whenever a rating is changed. That’s not part of the rating component so you’d have to set up the blocks for that.

1 Like

I thought that might be the case. I’m going to have around 100 items in my list and every item the user will be able to rate.

I’ll have a play around with the blocks and see if I can figure it out.

Thank yous.

You’ll want to avoid manually coding every rating update and instead use a loop. This screenshot shows the way I would not set this up at the top and then the way I would set it up at the bottom:

I’m not sure if your can update a spreadsheet that fast in a loop so you may need a Wait block at the end of each iteration of the loop.

I would just create a list of ratings. The list would be equal in links to the number of items that you need to write. When a rating is clicked I would figure out which rating component was clicked using the all components blocks. I would use the number of that component as the index and in the list of ratings I would change the value found at the index that corresponds to the rating component

1 Like

Sorry, I was a little too hasty with that screenshot. You don’t need a loop at all. Just check to see if the rating value was changed (there’s an event block for that) and then use the Update Value block I showed but instead of the row id, get the rating component #… something like that.