Like counter

2 Likes

AWESOME !!! you saved the day with this video !!! finally
I didnt realized the spreadsheet seen with the " DATA " feature views it differently then the spreadsheet itself and has all those features and formulas

2 Likes

Yes! The data editor in Glide, while more limited than a spreadsheet regarding the AMOUNT of formulas available, is MUCH MORE convenient (and instantaneous) than spreadsheets.

How did you manage to use the like/dislike button for each user?
I only manage to make each user write a text or a rate, but like/dislike button.

Then, can you see (in a sheet, or in data) the different comments (text, rate, like…)?

so for all my FRUIT ITEMS i created a boolean function so signed in users can save favorites etc …
and then i created a checkbox function so they can click like or dislike
hope this helps

1 Like

How did you manage to do this counting? it’s not possible to add the likes, isn’t it?

Thanks
But do you manage to count the number of likes and dislikes?

I didnt need to know this information , so I dont know if you can

As far as I know, you can’t do a rollup count of likes yet. It stores a number, but at best you can only store it for each individual user. You just can’t total the number of likes.

Hello, any update on this topic ? Or may someone can tell me how to do the average with the rating, for a specfic item not for the current user ?

@Robert_Petitto has a pretty good video on Youtube on this particular use case (https://youtu.be/O7TEF5z5t7U)

1 Like

I’ve also implemented a workaround to enable rolling up ā€œLikesā€ that might work for other people as it did for.

By using a button, you can add an Action called ā€œincrementā€. I added a column to my spreadsheet called ā€œLikesPositiveā€ and any time someone clicked the Button I added, Glide would +1 to the ā€œLikesPositiveā€ column on that item (regardless of the user).

Obviously the above is open to spam and people constantly smashing the like button, so what I did was create a User Specific Column called ā€œVotedPositiveā€ which was also incremented whenever the user clicked the button.

With all the ā€œā€¦Positiveā€ variables, I also added the ā€œā€¦Negativeā€ equivalents and the ā€œTotalā€¦ā€ equivalents too, to use in conditions.

i.e. TotalVoted = VotedPositive - VotedNegative
I then added a display condition which meant the ā€œLikeā€ button would only show up if ā€œTotalVotedā€ was less than 1 (meaning you either haven’t voted or you voted and unvoted).
The ā€œUnlikeā€ button would then show up in the opposite (i.e. the ā€œTotalVotedā€ is more than 0).

I repeated the same for the Total Number of Likes, which were not user specific columns.

I hope this helps, and I’d be happy to do a video to explain more clearly if people require.

7 Likes

I’m running into an issue where the dislike button stays if that is the first button pressed. The ā€œunlikeā€ button will continue to stay visible and can be spammed unless the ā€œlikeā€ button is pressed first or when you spam enough ā€œlikesā€ to get it past 0.

I tried incrementing by ā€œ-1ā€ and that didn’t help me.

Trying a few workarounds but getting stuck with my if-then logic. I tried having a statement where:

IF VotedNegative > 0 AND IF VotedPositive is empty THEN ā€œLOCKEDā€ and I tried that as a visibility condition.

Any thoughts?

What I did to try and make it simpler is to have a column in the spreadsheet which calculates the ā€œTotal Likesā€. So you increment the positive likes when someone clicks the like button, increment the negative likes when someone ā€œunlikesā€.
You then have a formula ā€œ=PositiveLikes - NegativeLikesā€ then base all conditions on that single TotalLikes column.

Hope that makes sense.

1 Like

Have implemented a simple solution for this in this app to verify City-wide Covid Resources: https://citywideresources.glideapp.io/

You can copy this app.

3 Likes

Actually @Robert_Petitto is one of the best glide apps creator ever I really like his videos and every glide user should subscribe to him

3 Likes

Aw shucks. You’re too kind!

1 Like

In the meantime, is it yet possible to roll-up user-specific data?

There are newer posts at the end of this thread, but the answer is…not natively.

2 Likes

Hi @Robert_Petitto ,

do you know when Rollup function will work over different users?

I’d like a likes-counter, so I created a user-specific column for storing the ā€œlikesā€, but I’m not able to sum them across the different users.

Do you have any suggestion in order to implement this?

Thanks!