How to sort posts by upvotes?

Hi, this is a productlist app and here I want to create an experience that will sort the higher upvote posts to first but I can’t do it becuase I’m using upvotes data type is users not an numbers, So please help me to solve this feature.

Website link :


The simplest (and most performant) way to do this will just be to create a number field on the Post datatype to store the number of upvotes…

If you’re doing it retrospectively you’ll need to run a backend workflow to set the vote counts…

Then, in the future, just update it anytime a new upvote is made.

1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.