All I’m trying to do is have a “next” button display the next item in a repeating group in a group above it. Imagine a list of songs, (like an album) in the repeating group. Above the list is a group that displays the song info. You hit the next button and you get the details of the next song displayed in the group above it. The repeating group can’t be a fixed amount, (albums have different amount of songs) so I can’t use the next item function. All I have are first item, last item and random item. Why not next and previous?? I see some hard to understand post about adding + 1 and an invisible input but nothing concrete and straight forward which I find hard to believe. This was the last thing I thought I’d need to get on the forum to ask but I can’t find a way on google or here that I can make work. Any help would be awesome!! Thanks you!!
Can you please take some screenshots to a screen recording to help understand what you want. From what I can see, it seems very easy, but I also feel like I am missing something.
Benjamin
Here’s a simple way…
-
Have a custom state on the repeating group called something like ‘Song Number’ which is a number type, with a default value of 1
-
Set the data source for your ‘Song Info’ group to be your repeating group’s list of songs, item number ‘repeating group’s Song Number’ (i.e. the custom state value).
-
Your ‘Next’ button will simply set the value of your repeating groups ‘song number’ custom state to it’s current value plus 1.
Hi Ben, I think what I need to do is what the adamhholmes has outlined below. I just don’t know how to do those steps. lol. I know how to create a custom state but interacting with it, adding +1, -1, I don’t really know how I actually do that. I’m going to explore what bubble says about using custom states and maybe it’ll make more sense to me. Thank you for responding. I really appreciate it. HNY.
Yup, that that sounds good. There is a tutorial from Coaching No Code Apps that sounds like what adamhholmes said if you are curious.
Benjamin
Hey Adam, thank you for your reply. So I made the custom state and set it to 1. In the screenshot I have the “song info” group which is “track player group” with it’s data source set to the list of tracks from the repeating group, how do I get the item number to "repeating group’s song number? I don’t get the option. Do I not put item# after list of tracks? Or what should I be putting in after “list of tracks” Thanks again for your help. I really appreciate it. HNY!
Thanks Ben! I’ll check it out. I just replied to adam, with a screenshot. I’ll get this figured out one way or another. Cheers!
After RepetingGroup Tracks’s List of Tracks:item#
you need
RepeatingGroup Tracks’s Track Number (or whatever the name of your custom state was)
Then to move to the next track, whenever your ‘next’ button is clicked, run a workflow to set the ‘Track Number’ state of your repeating group to it’s current value plus 1.
Thank you sir!! That was what I needed to see it. It’s working. I appreciate the help. What would I do without the Bubble Forum. Cheers!!
Hi Adam, I hate to bother you but one last thing. Each of the cells in the repeating group has a play button so you can play whatever song from the list you want. How do I make it so when that button is pressed it makes that track the track number that is now getting either plus or minus one? the player works and will let me skip ahead and go back, but if I scroll down and play a track, from that point the next and previous buttons don’t work. I’m trying to set a state in the play button workflow but I’m not sure what the phrase is supposed to be. Make sense? Am I on the right track at all? Thanks again.
When the play button is clicked, run a workflow to set the ‘Track Number’ custom state of the repeating group to the current cell’s index
Hi Adam. Thank you . I thought it would be something easy like that. Unfortunately it didn’t solve the issue. I checked everything and the previous and next buttons work now like I wanted but not if I click the play button on one lower.
So, I emailed the developer of the music player and he sent me these links,
Editor view: Try999 | Bubble Editor
https://try999.bubbleapps.io/version-test/aplayer?debug_mode=true
His demo works. I’ve now copied his workflows and everything exactly as he has them there. And it doesn’t work. Ha! I’m going to email him now and send screenshots of what I have. I’ll send them here too. If you see anything I’m missing, I’m all ears. No worries if you’ve had enough. Lol! So strange to be stuck on this. Thanks again.
![image|690x258]
It looks like it’s all set up correctly, so without more details it’s impossible to say what the issue is.
If you want to post a link to your editor (read-only) on here I’ll take a quick look over it for you to see if I can see what’s not working.
Hopefully I did that right. Group Player Basic is the group you want. Thank you!
Ok, I suspected this might be the issue and it is… you’ve got an unnecessary second action in the workflow which is over-riding the first one.
You’ve got 2 separate actions happening when the ‘play button’ is clicked - the first is setting the state to the current cell’s index (which is what you want).
The second action is displaying the current cell’s track in the Track Player Group, which is changing the original data source for the group, (this action is not needed).
That’s why, after clicking one of the play buttons you can no longer skip forward or back (the custom state value is no longer part of the player group’s data source, so has no effect).
You don’t need the second action in the workflow, so just delete it and everything should work as you want it to.
I’d buy ya a drink if I could sir! That was it indeed. Works great now. Thank you for all your help. It’s super appreciated. Have a great New Year!
This topic was automatically closed after 70 days. New replies are no longer allowed.