Using a List Viewer to Navigate

I want to do something that seems fairly simple but I can’t seem to figure it out. I put a list viewer on a page and I added items to it and now I just want to navigate to different pages in the app depending on which item in the list is clicked. I can’t seem to figure out how to attached a separate “navigate to” block onto each item in the list. Am I thinking about this right? Any help is much appreciated!

Michael

Is it a pre set list of pages? Or does it need to be dynamic? Are you using snap to place or drag and drop; A link to your project would also be helpful so we can see what you are doing and we dont be starting from scratch :wink:

Make a local data source with a url in each row of the first column.

Then, in the When List Viewer Item is clicked block, navigate to Open link [Get Value for column 1, row id [index] ]. The index value is the number of the item that was clicked so you’re getting that row # which will contain the corresponding url.

1 Like

Maybe I’m not getting it, how does the URLs help woth navigation?

Edit: I don’t know why I thought this topic was about urls… reading fail.

I made a mistake. The block would be the Open link block, not the Navigate block.

Here’s a demo: Thunkable

@mbritt See the first screen (with your username).

3 Likes

@tatiang I don’t think that is what he means.

@mbritt you can use if statements to check whether the selected value is equals a value you want and then if it’s true you can navigate the user to the right screen.

1 Like

Yes, I think @sketch is suggesting what is closest to what I’m looking for - a block that checks to see which item in the list has been clicked and which will take the user to the page (interior page - not a url) corresponding to that item. Here is a link to the project (still in early stages of development) The app teaches students how to memorize various Psychology terms. From the homepage, click on “Test” and you’ll see the page with the list viewer. I want to send users to a different page depending on which item they clicked. Can you just give me a little more info on how to set up the if statements with the list?

Appreciate all the help!

Michael

1 Like

Something like this will do the trick.

Screenshot 2022-06-21 5.10.22 PM

you can use the cogwheel to change its form.

5 Likes

Yup! That worked. Thanks so much. :grinning:

1 Like

You’re welcome

This would be simpler
image

2 Likes

Yeah,
I know but if he wants to give the list items a different name than the screen,
It wouldn’t work Wich is why I shared this approach.

2 Likes

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.