Forum Academy Marketplace Showcase Pricing Features

Going to "Next Item" using RG and URL params Issue

Hi Guys!

I’m in need of help with going to the “next item of a list”. I’ve built most of the functionality using the help from observing previous forum posts, but no where i can find seems to have the solution to my current issue.

In the URL parameter I’m passing data which contains a list , with the key “i-id”.

Here I have a group containing what is supposed to show the list items , broken down 1 by 1, and navigated using Custom States via the “Next” and “Back” Buttons.
As you can see, the first part of the expression involved getting the list from the URL, and getting the Item number is done by:

  1. Creating an Invisible Repeating Group, with a custom state of “Task Number”, default value = 1. The repeating group hasn’t got a data source. The only data source is the main group.
  2. “Next Button” adds a value of +1 every time its clicked, which should change the value of the custom state “Task Number”, all the way up until the the Task Number is greater than the number of tasks in the list from the URL parameter.

Looking at debug mode, I can see that the Task Number is actually increasing, but the text value “Parent group’s Tasks’s Order nr” and “Parent group’s Tasks’s description” do not change. They stay at the first value, where the list Item# = 1.

So In essence I’m unable to get the List’s Item Number to increase from 1. Really appreciate help with this. Has got me stumped all day.

Thanks Bubblers!

Hey @andrewfayle

Cool process you’re building here. Happy to talk through options provided I’m understanding your goals correctly!

Sounds like you have a list, and you want to be able to show 1 item from the list, and need the ability to change the item number so you can click back and forth through the list as needed. The list and the item number are both being specified in the URL when the page is loaded.

To tackle this, I would set Group_Task to look at the list (specified in the URL) and to reference item # (get data from url) to get the item number. When back or next is clicked, you’ll use a ‘go to page’ action where the new parameter is to the current parameter +1 (or minus, depending on the button that’s clicked).

Since Group_Task is loading the list and dynamically pulling 1 item, by it’s item number out of the list, when you change the url parameter, this should update automatically to display the next (or previous) item.

Keep in mind, you could also handle this with states, but if you want the ability to pass in both the link and id using the url, then it might make the most sense to handle the counting in the url as well. I’m not sure if you’ve tried this yet or not, but with a go to page action for the same page Bubble is smart enough to not refresh the page but instead just update the parameter and any elements that are referencing the parameter.

Give this a try and don’t hesitate to reach out to [email protected] with any additional questions.

1 Like

Thanks a lot fellow Andrew! That makes sense now!