Hi,
I need to get the content of a RG’s page. Do you have a suggestion on how to do it?
Use case:
I have a repeating group with a list of restaurants. The RG has a fixed number of elements, 6, therefore the user can navigate the pages with the workflows. This works good.
On the other side of the screen I have a map, where I want to show the restaurants which are displayed on the current page of the RG. If the user goes to the next page of the RG, the list of restaurants on the map changes.
Currently I set up the Map to display the data source of the Repeating Group, but it displays all the loaded restaurants. I tried to play around the various data source options but didn’t found out a way to select as data source only the restaurants in the current page.
Do you know how I can achieve this?
Thanks!
Hi @SerPounce,
thanks for the reply.
I already implemented the feature which shows on the map the selected restaurant, through the action “Set Current Map Marker”.
What I would like to have, is that when the user navigates through the pages in the RG, the list of markers on the map changes. For example, when the user first arrives to the page, then the map shows the 6 restaurants which are displayed on the RG. If the user navigates to the next page in the RG, then the map updates its markers to the new list of 6 restaurants shown in the RG. And so on.
Alex
Ah, I see. How about this then:
For the custom state on the page itself make it of type restaurants, but make it a list.
Then add a workflow that when user navigates your RG, update the custom state with the list of current restaurants.
Then add the constraint on the map to be where this restaurant is in the list within the custom state.
Hi @SerPounce,
I managed to implement it with the items until and items from actions. I do some operations with the page number and I can set these two custom states differently every time I navigate in the list.
Thank you for your support!
Alex
1 Like