# How to toggle between screens and retain their contents

**URL:** <https://community.thunkable.com/t/how-to-toggle-between-screens-and-retain-their-contents/2168634>\
**Category:** Questions about Thunkable X\
**Created:** [December 7, 2022, 5:26am UTC](https://community.thunkable.com/t/how-to-toggle-between-screens-and-retain-their-contents/2168634 "2022-12-07T05:26:56Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![anandavardhana57zwwl](https://avatars.discourse-cdn.com/v4/letter/a/8baadc/32.png) [@anandavardhana57zwwl](https://community.thunkable.com/u/anandavardhana57zwwl)\
**Post date:** [December 7, 2022, 5:26am UTC](https://community.thunkable.com/t/how-to-toggle-between-screens-and-retain-their-contents/2168634/1 "2022-12-07T05:26:56Z")

</div>

When I go to WebPreview this is how it looks:

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/d/4/d41bd82003f881c56ee98638546dbc62d73bb650.png)  
I click the TriggerFunc and I get this screen  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/a/4/a42028b5b3a9bf77e20d7aa57c5a55dd27c96fd3.png)  
But you will see at the top MainScn is selected but it is showing the contents of DbgScn. Out of sync. Then on what ever I click I keep getting the first screen:  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/c/5/c5a750b16a0341656dc4a03632404f411572ce09.png)  
The blocks for the DbgScn is this  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/8/f/8f06c8593a111699761fafd737e5a5545bfcc3d5.png)  
Here as long as DbgTraceInProgess is True it keeps going back to MainScn after the last func is called it just stays in DbgScn. Please tell me what should I do to make the top menu item and the screen displayed below in sync? Also the value of both the screen should not be lost as long as I am in WebPreview. Please advice.

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [December 7, 2022, 6:37am UTC](https://community.thunkable.com/t/how-to-toggle-between-screens-and-retain-their-contents/2168634/2 "2022-12-07T06:37:40Z")

</div>

The tabs at the top of the Design/Blocks page do not update as you navigate through your app while previewing it in a browser. So if you are editing MainScn and you preview the project, it will always have that screen selected regardless of which screen you are actually previewing at the moment.

If that doesn’t answer your question, consider posting a link to your project.

---

<div class="post-metadata">

**Author:** ![anandavardhana57zwwl](https://avatars.discourse-cdn.com/v4/letter/a/8baadc/32.png) [@anandavardhana57zwwl](https://community.thunkable.com/u/anandavardhana57zwwl)\
**Post date:** [December 7, 2022, 1:44pm UTC](https://community.thunkable.com/t/how-to-toggle-between-screens-and-retain-their-contents/2168634/3 "2022-12-07T13:44:02Z")

</div>

Thanks, yes that does answer one question. Your answer gave me a different perspective to the problem, let me rethink my issue and see if I can fix my issues, if not will post the link. Thanks again for the prompt answer.

---

<div class="post-metadata">

**Author:** ![anandavardhana57zwwl](https://avatars.discourse-cdn.com/v4/letter/a/8baadc/32.png) [@anandavardhana57zwwl](https://community.thunkable.com/u/anandavardhana57zwwl)\
**Post date:** [December 8, 2022, 12:31am UTC](https://community.thunkable.com/t/how-to-toggle-between-screens-and-retain-their-contents/2168634/4 "2022-12-08T00:31:49Z")

</div>

[https://x.thunkable.com/copy/9d3cb3762596e74d81e20a7885ce602f](https://x.thunkable.com/copy/9d3cb3762596e74d81e20a7885ce602f)  
Tatiang here is the link and it is baffling. Screen1 and Screen2 are absolutely identical but for the values data1 and data2 gets initialized. Screen1 works Screen2 does not ☹ What have I missed? Please advice.

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [December 8, 2022, 5:43am UTC](https://community.thunkable.com/t/how-to-toggle-between-screens-and-retain-their-contents/2168634/5 "2022-12-08T05:43:38Z")

</div>

This is what I get:

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

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

I assume that means both screens are working correctly.

**Edit:** oh wait, I do see that Screen1 joins the existing label value to the label’s text but Screen2 does not. So yes, there’s something broken there.

![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/f/4/f4a4cedb5e5035013d5efe091f1e747d77ce6bb3.png)

![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/9/0/90e3b24871e70c88fb42fd9fea89911db64a3d98.png)

One of the labels has a persistent value across screens and the other does not. Neither one _should_ have a persistent value. It does the same thing on my iPhone 11 in Thunkable Live. I can’t explain this.

---

<div class="post-metadata">

**Author:** ![anandavardhana57zwwl](https://avatars.discourse-cdn.com/v4/letter/a/8baadc/32.png) [@anandavardhana57zwwl](https://community.thunkable.com/u/anandavardhana57zwwl)\
**Post date:** [December 8, 2022, 6:06pm UTC](https://community.thunkable.com/t/how-to-toggle-between-screens-and-retain-their-contents/2168634/6 "2022-12-08T18:06:49Z")

</div>

Should I wait for some one else to respond or put this as a new issue so that someone can take a fresh look at it. I will put the link and some explanation.

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [December 8, 2022, 6:56pm UTC](https://community.thunkable.com/t/how-to-toggle-between-screens-and-retain-their-contents/2168634/7 "2022-12-08T18:56:14Z")

</div>

I would suggest submitting a [bug report](https://docs.thunkable.com/bugs-and-feature-requests).

---

<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:** [March 8, 2023, 6:57pm UTC](https://community.thunkable.com/t/how-to-toggle-between-screens-and-retain-their-contents/2168634/8 "2023-03-08T18:57:12Z")

</div>

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