Hi, I have two questions about the repeating group:
I want to display in a repeating group only “stories”, which are created in the current week. When a new week starts, the repeating group should be empty, until new stories are posted. Does somebody know how to do this?
A story can get likes and I want to sort the repeating group by “Liking user” (it’s a list of users in the database) and the story with the most likes should be at the top. But when I want to sort the repeating group, the field liking user isn’t displayed. (See picture at the bottom) Does somebody know how I can sort it by liking users?
Hi there, @Jakob1… for #1, try adding this constraint to the repeating group’s search.
As you have already seen for #2, you can’t sort a repeating group by a field that isn’t on the associated data type. So, if it was me, I would likely add a field to the
Story data type that I could use to sort the repeating group. The field could be a simple count of whatever your “Liking user” thing is or it could be a list, but that’s probably the way I would go.
Hope this helps.
Hi, everything went out perfectly, but know it’s Sunday (I live in Austria) and the repeating group is already empty. Actually it should become empty on Monday. Do you know the reason for that? I did the same setup like you (see picture at the bottom)
The reason for that is because Sunday is considered to be the first day of the week in Bubble (it is day 0 and Saturday is day 7). Try this…
When I try this, nothing is displayed in the repeating group, not even a story, which is created one second ago
Ah, my bad… unless I am missing something simple (which certainly could be the case), it’s actually a bit more complicated when the day is actually Sunday. I made an example that conditionally changes the repeating group’s data source as follows, and it appears to work as expected.
Want to give that a shot?
Thank you very much, it works properly
Hi, now it’s Monday, 2am and the repeating group still contains every story and isn’t empty. I think I did the same setup like you (see pictures at the bottom), but maybe I made a mistake. It seems like a never ending story
Do you maybe have a clue, what else could be done?
I have tested that setup pretty well on my end, and it appears to work as expected. If you want to send me a link (privately) to your editor, I can take a look at your app.
Ok thats funny. I made a copy of my app with the same database and changed nothing to share the link of it. I previewed the copy and now everything worked! Than I got back to the original and it didn’t work. So I made a copy of the repeating group in the copy and pasted it in the original and now everything works out (so far )
Very strange, but the main thing is that it works
And thank you for your patience:)
This topic was automatically closed after 70 days. New replies are no longer allowed.