Forum Academy Marketplace Showcase Pricing Features

Sort by dynamic field

I was checking the Sort by dynamic field option and I’m trying to understand how I could use it.
Think of something like this forum, or Product Hunt, for example. Each page has a number of likes and a number of comments.

I want a repeating group to sort the link to these pages not by likes or by comments, but by the sum of both.

When I chosse sort by dynamic field, I don’t see the options to get “current likes” and comments. I see a place where I can do a search for, get parent thing…

Is it possible to do what I want? To be more precise: I have the pages, they have likes, but I want to sort them considering a weight factor of how recent the element was submitted so it would be a formula with likes and time.


I have a very similar issue.
What I have in mind but have not tried yet, is to have a additional field on the thing, to do the sum of both counts (in your case the sum of likes + comments).
That could answer your first issue, but again, like you, i would like to add a weight to take into account more criteria…

Maybe using the new dates functionality to calculate the time between the creation date and the current date, and then set rules like: If less than 2 days =10 / if between 2 and 5 days = 5, etc. and then you add that to your “Sum” field and sort them… but ideally that would need to be balanced with some coefficient…

Maybe someone has already done something similar?

Wouldn’t it just be easier to have another field called “combinationOfLikesAndComments” on the post?

Obviously use a less gross name. So you’d just add 1 to that every time a new like or a new comment was added, then your sorting options are by Likes, by Comments, or by Both (which points to that field)

That would certainly do the job @potentialthings, but as @sam.drouard said, it does not solve actually when we want to use date as part of the formula. I’m trying to do a sort like Hacker News

1 Like

Ah, missed the date part. Yeah, dunno about that, have to think about that one a bit.

Mario, have you managed to solve this? I am in exact same position…

@andrewmackers sorry for the delay, and anyway, no positive answer. One way I’m thinking is to have a rank field that is change on each interacation, which is not so good as the rank wouldn’t change if there is no interaction with the item for a long time.