# (solved!) Any way to make a switching mechanism?

**URL:** https://community.thunkable.com/t/solved-any-way-to-make-a-switching-mechanism/2306098
**Category:** Questions about Thunkable X
**Tags:** solved
**Created:** [March 3, 2023, 2:17pm UTC](https://community.thunkable.com/t/solved-any-way-to-make-a-switching-mechanism/2306098 "2023-03-03T14:17:06Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![kovalenko1a9upf9](https://avatars.discourse-cdn.com/v4/letter/k/ecc23a/32.png) [@kovalenko1a9upf9](https://community.thunkable.com/u/kovalenko1a9upf9)
#### Post date: [March 3, 2023, 2:17pm UTC](https://community.thunkable.com/t/solved-any-way-to-make-a-switching-mechanism/2306098/1 "2023-03-03T14:17:06Z")

</div>

ill type here to make the question more clear.  
i want to create a “Gallery” program and i want to make it so that when you click a button, lets say “back” it would give me a a picture that was before i skipped it, and the same to “forward”.

---

<div class="post-metadata">

### Author: ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)
#### Post date: [March 3, 2023, 2:34pm UTC](https://community.thunkable.com/t/solved-any-way-to-make-a-switching-mechanism/2306098/2 "2023-03-03T14:34:08Z")

</div>

Can you explain where the photos of the Gallery are stored?

For example, if you have a table that holds images then you will add an image component in your screen and two buttons (next and back).  
When the screen opens you will read the table and display the first image and when the **next** button is clicked you will read the next image in the table and show it in the image component. If the **back** button is clicked you will read the previous record from the table and display the image. You will need to create a variable that holds the position of the table to know where to go.

This is the general idea.

---

<div class="post-metadata">

### Author: ![kovalenko1a9upf9](https://avatars.discourse-cdn.com/v4/letter/k/ecc23a/32.png) [@kovalenko1a9upf9](https://community.thunkable.com/u/kovalenko1a9upf9)
#### Post date: [March 3, 2023, 2:37pm UTC](https://community.thunkable.com/t/solved-any-way-to-make-a-switching-mechanism/2306098/3 "2023-03-03T14:37:15Z")

</div>

i will try making the variable, thanks.  
I will update if i can do it, thanks for the information!

---

<div class="post-metadata">

### Author: ![kovalenko1a9upf9](https://avatars.discourse-cdn.com/v4/letter/k/ecc23a/32.png) [@kovalenko1a9upf9](https://community.thunkable.com/u/kovalenko1a9upf9)
#### Post date: [March 3, 2023, 2:54pm UTC](https://community.thunkable.com/t/solved-any-way-to-make-a-switching-mechanism/2306098/4 "2023-03-03T14:54:13Z")

</div>

Hello again, sorry for disturbing, i guess, the actual question is how to make that variable, rather than making the skipping.

---

<div class="post-metadata">

### Author: ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)
#### Post date: [March 3, 2023, 3:16pm UTC](https://community.thunkable.com/t/solved-any-way-to-make-a-switching-mechanism/2306098/5 "2023-03-03T15:16:48Z")

</div>

I made this simple design  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/5/b/5b209da7350196956c76a2ff241eaa9d5b74852e.png)

I uploaded the images into the project assets  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/a/7/a730fe23ab7151662db42c2024595e8d7b89d5ba.png)

Following are the blocks

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/8/8/88dd376f01970e06a185c655325bda32eb4bc27b.png)

Back button code

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/e/8/e8458d013e193c357a3fa433bcae5a422d409837.png)

Forward button code

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/1/9/19cd655c837a98cdf2e109b3ddba995e32dc3706.png)

Demo  
 ![battery images](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/d/a/da7a294b2659e4391ad5f23c3623e40bd3f76d1c.gif)

I hope this makes it clear.

---

<div class="post-metadata">

### Author: ![kovalenko1a9upf9](https://avatars.discourse-cdn.com/v4/letter/k/ecc23a/32.png) [@kovalenko1a9upf9](https://community.thunkable.com/u/kovalenko1a9upf9)
#### Post date: [March 3, 2023, 3:18pm UTC](https://community.thunkable.com/t/solved-any-way-to-make-a-switching-mechanism/2306098/6 "2023-03-03T15:18:07Z")

</div>

Wow, this is indeed a really cool one, thanks, alot.

---

<div class="post-metadata">

### Author: ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)
#### Post date: [March 3, 2023, 3:18pm UTC](https://community.thunkable.com/t/solved-any-way-to-make-a-switching-mechanism/2306098/7 "2023-03-03T15:18:35Z")

</div>

Welcome

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/f/0f59f292712368bce16ff80133ae10de8a6f27e8.png) [@system](https://community.thunkable.com/u/system)
#### Post date: [June 1, 2023, 3:18pm UTC](https://community.thunkable.com/t/solved-any-way-to-make-a-switching-mechanism/2306098/8 "2023-06-01T15:18:53Z")

</div>

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