Using dynamic data from repeating group

My situation:

  • Got a companies type in database.
  • Repeating group displaying 1 cell
  • Buttons to go to previous and next in the repeating group
  • Browser plugin to edit url in the browser to add the slug of the company displayed in the repeating group
  • On load the browser plugin edits the url in the browser with adding the slug of the first company in the repeating group

How can I make it so that when the next or previous company is shown (button click) in the repeating group, the slug in the url changes?

What if you didn’t use a repeating group?
For example:

Use just a group with the same contents as you have in the Repeating group cell. Change the group’s data source to ‘Current Page’s Company’ instead of the earlier ‘Current cell’s company’. For this you’ll also have to change the data type of the page to ‘Company’ (by double clicking on a bare part of the page).
Simply pass the Company as page data to the same page.

Now on the previous and next buttons workflow - first find the company you want to display on the successive page and then run ‘go to page’ to the current page and send this company as the data in that action.

Here you might face the challenge of knowing what the previous and next companies are, since you aren’t working with a list directly. Which means that you’ll always have to know what the index of the currently displayed company is in your list of companies.
There’s a way to do this:

Essentially for this to work both ways - from the RG or Group as well as from the URL - you’ll need this reverse search functionality.

Hope this isn’t too confusing :grinning_face_with_smiling_eyes:

Thanks for your help. I understand a bit of what you mean. But the part with using the expression and finding which companies are before and after the current company is difficult. I am not sure how to approach it.

This topic was automatically closed after 70 days. New replies are no longer allowed.