Rollup Likes

Rollup likes using actions while limiting to one like per user.

The action is configured as shown where the Like Counter is the actual counter and the “Liked By” Column is a user specific column where I am incrementing the user’s ID from their profile (It’s a basic number assigned to each user using a formula like =arrayforumla(row(A2:A))
I use this user-specific column to define the visibility of the button outside so that one user cannot like a post twice.

image

9 Likes

I wonder if you combined this with @Jeff_Hager’s floating button html code, with a thumb emoji as the button text. Would be a neat way to integrate it visually.

2 Likes

Oh for sure! I made this while I was experimenting with actions. Can make it look a lot more attractive.

1 Like

Could you show how it works? I mean the algorithm of rollup likes

Algorithm?

Hey @Manan_Mehta, @ThinhDinh, @Robert_Petitto, @eltintero

Has anyone figured out how to count streaks?

I have a personal app in which I’d like to add streaks count but I’m having trouble with the date part of it. I mean how to make it keep counting or restart the counting.

Thanks guys!

1 Like

I have a complex way of counting streaks on one of my apps where I am using many GSheets formulae and a script. Tried multiple things previously but that was the best way I could think of but that was before actions was launched.

Now with actions I think there can be a simpler way. I will have to think about it.

2 Likes

Streaks is tricky…had to use a complicated spreadsheet formula that I’ll have to go back and find.

2 Likes

You could probably do something with a relation and rollup to get a max date. Then create a math column to add 1 to the rollup date. Then maybe in a compound action, check if the math date is within Today. If it is, increment 1 to a streak column. Else, if it is after Today, then do nothing with the streak column as it’s already been counted for today. Else, just reset the streak column to 1. I’m imagining this on the form submit actions.

6 Likes

So smart!

2 Likes

Sounds good! I will try this.

It is going to be for a view detail. I’ll see what I can do.

Let you all know how it goes.

2 Likes

my favourite of the week!

1 Like

Improved the UI

5 Likes

Hi, Manan & Everyone,

I sincerely need your help on how to go about this. I am so lost right now. I have been working on this for 2 straight weeks until I stumbled on this video.

The truth is I don’t even know how or where to start from. Can you guide me please? I think it will help me to have an idea if I can see screenshot of your table and spreadsheet (where you input the fomrular). I already have screenshot of the compound action. I think this will give me push to know what to do.

Thank you.

Go about “this” meaning counting likes?

Thank you so much @Robert_Petitto for your quick response.

I am stucked in trying to implement the “Liked By by ID”. I have been able to get the counting likes done. I am trying to work on the buttons so that one user cannot like a post twice.

Thank you so much.

You’ll need to create a user specific column that records (anything really) when they push the like button. If that user specific column is not empty, hide the button to like.

Oh Okay. I will give it a try. Thank you so much for your help.

I really appreciate.

Hi @Robert_Petitto,

Thank you so much for your help. I am indeed grateful for helping me out.

The user specific column works fine just as you explained. I was able to hide and unhide the buttons, but then I discovered that the counting of likes per post is not working as I expected it would. The likes was not reflecting across board. It was not showing the current count when other users logged in. It was only showing for just one user.

I kindly ask that you assist me by going through the screenshots I provided below:

Then I also noticed that the hide and unhide button also does not show for other posts. It was not visible. It was working on just one post. Kindly see image below:

I have also included below the screenshots of the table where I set the counter.

Also below is the compound action I setup.

I am not sure if the way I have provided the informations are okay and I am not sure if it will help in guiding me through, but I don’t know what I am doing wrong. I will really really appreciate your help again.

Thank you.

Hi,

Hope my example can have. I have a bit of a complex setup with 4 columns and compound actions, but it can help with the logic that the user can only either like or dislike a post.

You can copy the app back and view the structure. Let me know if you have any questions.

1 Like