Hello Bubble experts
Can anybody help me showing next & previous week data in Repeating group when clicking previous & next week button?
I am unable to figure out the logic
This is my database data which i want to show
Thanks in advance for your help
[EDIT] There are 2 solutions in this, Post 3 & Post 6 by @mikeloc
not going to beat @mikeloc to the answer today… but you are in good hands… the answer is rapidly approaching you
Hi there, @mdburhan3… one way you could go here is to set a custom state (date range) when a button is clicked, and then use the custom state’s value as a conditional constraint on the repeating group’s data source. For example, setting the custom state when the This Week button is clicked would look like this…
Then, you could have a condition on the repeating group that says when that custom state’s value isn’t empty, do a search for events with a constraint where the created date is greater than or equal to the start date of the custom state’s range and another constraint where the created date is less than the end date of the custom state’s range. Make sense?
Hope this helps.
P.S. Too kind, @bubble.trouble… too kind.
Thanks for the response
I will try this & let you know…
@mikeloc Thanks once again
I followed exactly you wrote…
It works for my “This week” data…
How can i setup previous & next week data?
Setting the custom state for the previous week would look like this…
… and you should be able to figure out the expression for the next week.
@mikeloc Thanks it works
For the next week this is what i did (It works when i tested just want to show you & i hope it is Okay)
Yup, looks good. Oh, and I think you might need to blank out the other two custom state values when any of the buttons are clicked.
@mikeloc Thanks a lot
I don’t know how to mark your 2 answers as a solution
I am waiting for your reply from previous post
Hi one question, how did you get “( )” brackets after range? as i’m trying to add :round down to week but its not showing in the list so there must be a way to get ther
You can enable brackets from Settings section >> Version Tab
I tried doing this formula but cant get passed the Current Date after the <-range->. I dont have the option rounded down to
You need to turn on parenthesis (refer to the post directly above yours)
Ahh, its an experimental feature. Gotcha! Thank you @tylerboodman!
How do you manipulate the parenthesis? It kept putting the first condition before the <-range-> in the parenthesis instead of the last one