Forum Documentation Showcase Pricing Learn more

Creating a Constraint to Identify Data from the Previous Sunday to the Current Date

Hi guys! Bubble newbie here. I got the idea to make an exercise logging app that implements some newer exercise science ideas (such as effective reps, maximal recoverable volume, minimal adaptive volume, progress bars, etc.) into a web app. I’ve put in some decent hours setting up most of the inputs and getting everything into the database in the right formats and such, but I’m struggling with creating dynamic charts.
The idea is that I want to be able to pull data from a dynamic range depending on the current date. For example, I want to create a chart to display data from the previous Sunday to the current date. Like if today is Wednesday, I would want to pull data from every day between the previous Sunday and the current Wednesday. I DO NOT want data that is simply between the range of the current date and 7 days prior. I just can’t seem to wrap my head around a way to do this.
Anyway, if you made it this far, thank you. Any help at all would be greatly appreciated!

Hi,
Just calculate the current day of the week and manage this value into input integer.
And get the last sunday date by remove the number .
For your reference :

welcome to the community.
first you can set the current time and date to Monday,Tuesday and so on.
Base on that you can set state of the item you want to display.

Happy creating :slight_smile: