Trend filter with Likes

I am making an app similar to instagram and I want to add in the “home” buttons in “tendencias” which is “trends” I want all the publications to appear in an order from more likes to less likes and I have tried but it does not work. Here I share my app

Hi @Zaxkiro,

Welcome to the community :partying_face:

You have connected the Publications Collection to the Card List and in the Publications collection you have a number property to store the likes count and you have sorted that list by that number property ( Likes - High to Low ) but the list shows empty cards instead of the records? In the Card List delete the magic text values and add them again and try!

Like this :

Thank you

thanks. but I don’t know how to make it sort from the post with the most likes to the post with the least likes

In the database how you are storing the likes?

I have a relationship between the publications and the user, which would be the likes, and then I have a “number” with the total number of likes in the database of the publications, so what I am looking for is that when adding a like it is also added to the “totally like”

I already found the solution, so for those who pass by and want to know how I solved it, I did the following
-In the like button within the actions in the “total like” section, what I did was select the same “total like” and then place “+1” and in the case of subtracting a like the same but with a " -1" and done

1 Like