Help me make a RG cell click cause a 'scroll to entry' in another RG

Hey i have a RG that displays 12 items from an option set and another RG (that has just one cell) that also has its datasource as the same option set. I want to make it so that when a user clicks one of the 12 cells, it causes the other RG to be that same option.

Here is the 12-cell RG:

Screen Shot 2022-08-31 at 5.19.17 pm

Here is the workflow i tried to use to make the other RG scroll to and entry that is the same as the current cell of this 12 cell RG:

Screen Shot 2022-08-31 at 5.18.55 pm

And here is the single cell RG:

Screen Shot 2022-08-31 at 5.19.33 pm

Basically, why is my workflow step not working?.. currently, the single cell RG just displays the first option in the set no matter which of the 12 cells i click in the other RG

Any help is appreciated

‘Scroll to entry’ is a scroll action… (i.e. it’s for actually ‘scrolling’ to a position in a repeating group that contains a number of entries)…

If I understand your question correctly, you’re not trying to actually ‘scroll’ to anything here, you just want to display the details of a particular Medal from the first RG in the second RG, yes?..

So there’s no need to use a ‘Scroll to entry’ action (you only have 1 entry on your RG, so scrolling to an entry won’t do anything, as you’ve discovered)…

Firstly, is there a particular reason you’re using a RG to display the medal details? (it only has 1 cell, so a regular group would be simpler)…

If you use a regular group in stead of a RG all you need to do is use a Display data action to display the relevant medal details in the group.

If you insist on using a RG, it’s slightly more complex… you’ll need to change the datasource of the second RG to display only the selected item from the first RG…

There are a few ways to do that…

You could set the RG datasource to be the current cell’s medal, converted to list.

You could set the RG datasource to be get all medals, filtered, then use a constraint to match the medal to the current cell’s medal…

You could set the RG datasource to be get all medals medals, item number: current cell’s index…

But, surely the simplest way is to just use a regular group instead of a RG and use Display Data to show the current cell’s Medal (unless there’s some particular reason you’re using an RG here, or something else I’m missing)…

Ohhh ok i will stop trying to do ‘scroll to entry’ then haha.

There is a reason i am not using a normal group. I was originally using a regular group and it work perfectly using a set state. However, i had to switch to using a RG because i introduced a new feature were you can ‘show next’ (which works great).

But now of course i’m trying to get the main thing working again.

Fair enough (although it’s easy enough to set up the same thing with a regular group…)

In any case, if you stick with using a RG to display the Medal details, the simplest way will be to set the datasource for the second RG to be the current cell’s Medal, converted to list…

That doesn’t make sense to me, how can you make a RG source be a current cell?

I’ll try it with a normal Group but i don’t see a “display data” action anywhere.

How do you do that?

No, you need set the datasource for RG 2 in the workflow, when the item in RG 1 is clicked (using the Display List action)… then set the list to be the current cell’s Medal: converted to list

1 Like

Will this only work if i make RG 2 a regular group?
Screen Shot 2022-08-31 at 6.11.30 pm

No, if you want to use a regular group you can’t use a Display List action (that’s only for displaying lists), so for a regular group you need to use the Display Data action instead.

If you’re using a RG then you use Display List

1 Like

Ok well that last image i sent was on a RG and it seems to not work unless i’m doing something wrong. Do i need to make sure RG2 is a certain way for that expression to work?

I got it!
Screen Shot 2022-08-31 at 6.29.31 pm

It works now, however the carrousel buttons don’t go to the next item anymore
Screen Shot 2022-08-31 at 6.32.08 pm

So now i’m kind of just back where i started (clicking the cell makes the correct info show on RG2 but the ‘show next’ function on RG2 doesn’t work. The whole reason i used a RG in the first place was to have that function

Yeah you can’t use show next item , as your datasource only contains 1 item (so there is no next item)…

If you want to stick with using a RG, and have the ability to go to the next and previous item using the Show Next/Previous actions, the best way will be to use a Go To Page Action instead of a display list action…

Keep your original datasource for RG2 as Get All medals

Then, when an item in RG 1 is clicked, use the Go To Page action on RG2, with the Page being the Current Cell’s index.

So i’d have to have a seperate page?

No… ‘Go To Page’ is an element action for repeating groups (as well as a Navigation action):

It will show the specific ‘page’ of the RG…

as your RG only has 1 cell, each page only has 1 item, so ‘go to page’ is basically the same as saying ‘go to item’, whcih I think is what you were trying to do originally with your ‘Scroll To Entry’ action…

The only difference is you have to give a page number (rather than an actual entry), for which you can use RG1’s current cell’s index.

1 Like

Ok thank you for your patience that sounds like it should work. i’m going to give that a try now i just need to get my head around it.

1 Like

Ok, so when a cell on RG1 i pressed i do this
Screen Shot 2022-08-31 at 7.11.11 pm

and now when the arrow on RG2 is pressed ‘show next’ is now working!

We did it. Thank you so much for your help bud. My app is a few weeks away from being complete!

1 Like

Glad you got it working as you want it to :slight_smile:

1 Like

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