# Is there a way to count favourites?- Solved

**URL:** <https://community.glideapps.com/t/is-there-a-way-to-count-favourites-solved/22324>\
**Category:** Ask for Help\
**Created:** [February 6, 2021, 1:32pm UTC](https://community.glideapps.com/t/is-there-a-way-to-count-favourites-solved/22324 "2021-02-06T13:32:56Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![shej](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/shej/32/20783_2.png) [@shej](https://community.glideapps.com/u/shej)\
**Post date:** [February 6, 2021, 1:32pm UTC](https://community.glideapps.com/t/is-there-a-way-to-count-favourites-solved/22324/1 "2021-02-06T13:32:56Z")

</div>

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

 ![db](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/0/f/0fbe0eb8a5563637327b64498d0ce1e3cb37d1a2.png)

---

<div class="post-metadata">

**Author:** ![RuchikaAbbi](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/ruchikaabbi/32/11240_2.png) [@RuchikaAbbi](https://community.glideapps.com/u/RuchikaAbbi)\
**Post date:** [February 6, 2021, 1:56pm UTC](https://community.glideapps.com/t/is-there-a-way-to-count-favourites-solved/22324/2 "2021-02-06T13:56:02Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![shej](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/shej/32/20783_2.png) [@shej](https://community.glideapps.com/u/shej)\
**Post date:** [February 6, 2021, 2:32pm UTC](https://community.glideapps.com/t/is-there-a-way-to-count-favourites-solved/22324/3 "2021-02-06T14:32:16Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Joe\_Gabriele](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/joe_gabriele/32/57595_2.png) [@Joe\_Gabriele](https://community.glideapps.com/u/Joe_Gabriele)\
**Post date:** [February 6, 2021, 3:13pm UTC](https://community.glideapps.com/t/is-there-a-way-to-count-favourites-solved/22324/4 "2021-02-06T15:13:48Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![shej](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/shej/32/20783_2.png) [@shej](https://community.glideapps.com/u/shej)\
**Post date:** [February 6, 2021, 3:15pm UTC](https://community.glideapps.com/t/is-there-a-way-to-count-favourites-solved/22324/5 "2021-02-06T15:15:22Z")

</div>

What is unique views?

How can I set it?

---

<div class="post-metadata">

**Author:** ![Joe\_Gabriele](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/joe_gabriele/32/57595_2.png) [@Joe\_Gabriele](https://community.glideapps.com/u/Joe_Gabriele)\
**Post date:** [February 6, 2021, 3:18pm UTC](https://community.glideapps.com/t/is-there-a-way-to-count-favourites-solved/22324/6 "2021-02-06T15:18:49Z")

</div>

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](https://community.glideapps.com/t/actions/18026/8)]

---

<div class="post-metadata">

**Author:** ![shej](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/shej/32/20783_2.png) [@shej](https://community.glideapps.com/u/shej)\
**Post date:** [February 7, 2021, 7:14am UTC](https://community.glideapps.com/t/is-there-a-way-to-count-favourites-solved/22324/7 "2021-02-07T07:14:49Z")

</div>

I saw it, thank you for sharing!

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

---

<div class="post-metadata">

**Author:** ![PabloMFalero](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/pablomfalero/32/31166_2.png) [@PabloMFalero](https://community.glideapps.com/u/PabloMFalero)\
**Post date:** [February 7, 2021, 7:27am UTC](https://community.glideapps.com/t/is-there-a-way-to-count-favourites-solved/22324/8 "2021-02-07T07:27:00Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![shej](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/shej/32/20783_2.png) [@shej](https://community.glideapps.com/u/shej)\
**Post date:** [February 7, 2021, 9:04am UTC](https://community.glideapps.com/t/is-there-a-way-to-count-favourites-solved/22324/9 "2021-02-07T09:04:55Z")

</div>

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?.

 ![hs](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/1/8/183fd4be3c850a72e64b6e65bad3f0e72300490a.jpeg)

 ![dt](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/0/6/0694b60d94613f5f1fa7c5474cfa82c2fe6d935e.png)

---

<div class="post-metadata">

**Author:** ![PabloMFalero](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/pablomfalero/32/31166_2.png) [@PabloMFalero](https://community.glideapps.com/u/PabloMFalero)\
**Post date:** [February 7, 2021, 9:44am UTC](https://community.glideapps.com/t/is-there-a-way-to-count-favourites-solved/22324/10 "2021-02-07T09:44:26Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![shej](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/shej/32/20783_2.png) [@shej](https://community.glideapps.com/u/shej)\
**Post date:** [February 7, 2021, 1:40pm UTC](https://community.glideapps.com/t/is-there-a-way-to-count-favourites-solved/22324/11 "2021-02-07T13:40:04Z")

</div>

Yay! It worked Thank you @PabloMFalero

---

<div class="post-metadata">

**Author:** ![PabloMFalero](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/pablomfalero/32/31166_2.png) [@PabloMFalero](https://community.glideapps.com/u/PabloMFalero)\
**Post date:** [February 7, 2021, 1:53pm UTC](https://community.glideapps.com/t/is-there-a-way-to-count-favourites-solved/22324/12 "2021-02-07T13:53:42Z")

</div>

Glad it did!!

---

<div class="post-metadata">

**Author:** ![Joe\_Gabriele](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/joe_gabriele/32/57595_2.png) [@Joe\_Gabriele](https://community.glideapps.com/u/Joe_Gabriele)\
**Post date:** [February 7, 2021, 7:09pm UTC](https://community.glideapps.com/t/is-there-a-way-to-count-favourites-solved/22324/13 "2021-02-07T19:09:48Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![shej](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/shej/32/20783_2.png) [@shej](https://community.glideapps.com/u/shej)\
**Post date:** [February 7, 2021, 7:16pm UTC](https://community.glideapps.com/t/is-there-a-way-to-count-favourites-solved/22324/14 "2021-02-07T19:16:12Z")

</div>

> [@MagicPattern CSS Backgrounds!](https://community.glideapps.com/t/magicpattern-css-backgrounds/17352):
>
> Hey guys! I recently discovered a tool called magicpattern. I love their css background builder. It’s free, and there’s NO SIGNUP REQUIRED!! I really like their amazing - but simple and minimalistic - backgrounds, and I look forward to incorporating this into my Glide app!

Picked from here via pablo
