@alexid95 I would do this differently. I would drop the True/False 1-5 star fields from the object collection and add a related collection called “Ratings” with three properties:
The 1-5 grape image (Image)
UserID (Relational - who submitted the rating)
Write a new record to the ratings collection every time someone leaves a rating.
Then in your card for the wine you make the image type = URL, average the ratings from the ratings table for that wine and have it display the graphic that corresponds with the closest rating that object has. If you need to do fractional ratings and images you can do that using the ROUND() function and make whatever “resolution” you need (10 images if you want to have 3.5 star capability, 20 images if you want to support 3.25 stars, etc). You’ll make use of the “Custom Formula” option in Magic Text to do this. I use this technique to render a “thermometer” image to show completion of funding for a particular project:
That makes it so you can just reference one image rather than having a bunch of complexity with visibility rules hiding showing partial images.
If you have to support infinitely granular star rating images then it might be worth messing with trying to do it via the visibility rules approach.
Also (and this is just personal preference) I would consider breaking out “Likes” into a separate collection as well. It’s generally better to store the raw data rather than derived values in a db (with some exceptions). You can log the data of each like in a separate “Likes” table and it records things like:
And then for displaying your likes count you just do SUM on the records in that table linked to that object/wine. That gives you the advantage of being able to wipe all the likes of a malicious liker gaming the system after the fact and be able to do things like mine data on usage patterns, etc later on.
anyways lmk if that makes sense