Forum Documentation Showcase Pricing Learn more

I'm needing to show User's "upvote number", but only from the last 30 days. Can you help?

Very much hoping you amazing people can help me out with something that’s stumping me :innocent:

I have a small ranking system on the side of my forum to show the ‘most helpful’ users (a repeating group with the appropriate constraints):

This is set by a workflow that increases the “upvote” count by 1 each time it is clicked:


This also adds the user who clicked “helpful” to a list of users attached to the Reply:

The part I’m struggling with is somehow filtering this ranking section (the repeating group) to only show the total count of upvotes from the last rolling 30 days.

My first thought was there would be a constraint I could use that would say something like “field: upvote, modified in last 30 days”, or a step in the workflow that adds the upvote +1 that would “remove result of Step 1 after 30 days have passed” or something similar, but I can’t seem to find out how to do this.

Can anyone help me figure out a way to call only the last 30 days’ worth of upvotes to show in this repeating group?

Thanks in advance! :pray:

Hey @jamesdaly,

Without knowing your full database structure it’s a little difficult but it here goes. You would have to create at database search on the upvotes creation date, using a date range. This would be from the current time/date minus 30 days (in seconds) to the current date.

Hope this helps

Thanks very much for the response, I appreciate it given it’s tricky without knowing the full database :smile: as soon as I’m back at my laptop I’ll give this a try.

In the meantime, I think I’ve done this right (let me know if I haven’t, I haven’t shared a read-only version of a Bubble app before) this is the app here if checking the database structure will help anyone with an answer:

Editor: https://bubble.io/page?type=page&name=community&id=findyourbuilder&tab=tabs-1

View: https://findyourbuilder.bubbleapps.io/version-test/community

Thank you!