Is there a way to count favourites?- Solved

Is there a way to count favorites- how many favorited user profiles, user posts?

I tried rollup count and then template thing. But it does not work. If anyone likes any 1 or 2 posts, the same value shows up for all posts.

Why I want this? To show trending authors and posts on front page

I think Favorite is only marked on the individual user’s side, so you might need to set some kind of counter on the post when someone chooses it. This way you’ll know on all posts how many selected it and such.

Yea, trying to figure out how. Tried the rollup count thing dint work.
And then there is no way to set anything in builder itself.

I have a “Most Popular” Post section, but its set based on # of Unique Views, not on # of Favorites. I also sort the list based on highest # of Unique Views and limit the # to 10 showing.

1 Like

What is unique views?

How can I set it?

Unique views means that if the same user looks at the same post 10 times, it only counts it as 1 view. But if 100 different viewers look at the same post, it counts as 100.

Check out this video

[🆕 Actions! ⚡⚡⚡ - #8 by Robert_Petitto]

4 Likes

I saw it, thank you for sharing!

One question: How to set the date last visited column? How do you get that info?

Use a user specific column using the date component and then use a set columns action with current date and time connectee to the column you just created

The first is the home screen where I somehow want to show posts with the highest views.

Here how to do this part here “then use a set columns action with the current date and time connected to the column you just created

Use a user-specific column using the date component Did this part in the second screen, is it correct?.

Yea, that’s right. Then add a number column too, and here’s the logic and action for when you click on a post:
If date is empty: set columns( current date and time) and increment by one ( the number column)
If date is not empty: set columns (current date and time)

This way you’ll have a view counter, but if the same user clicks on the item twice it will only count as one view.

Then just order sheet by views, with the highest at top

2 Likes

Yay! It worked Thank you @PabloMFalero

1 Like

Glad it did!!

1 Like

Curious, how did you set the background image? What div did you use?

Picked from here via pablo

2 Likes