Close all screen copies

My app has search function When searched it open it opens a search results screen.
On search results screen, there is a button to search another word it opens search screen.
and then it opens another copy of search results screen.
When back pressed one copy of screen closes and the past copy of that screen appears.
Now I want to make a function when button clicked all screen copies should close and go back to home screen

Well, you might to close every screen when jumping to next one… and on every screen put open home screen option on when back pressed event…

No.
I have three screens
Home Screen - This has Search Button
Search Screen - Search Query
Search Results Screen - Shows Search Results and has Search another query button

On Search Screen Query - Search Screen Closes and opens another screen Search Results.
On Search Results Screen Search Button Clicked - Open Search Screen

On new query it opens a copy of Search Results screen because it has not closed before

Now the problem how to close all screen copies of search results screen at once and go back to Home

Why do you need a different screen to show the results?

because some confusion in heavy blocks
I want keep it organized

I think this works.
I will test and reply

On home button click
blocks (1)

Search on community for how to switch screen correctly…

Try using this;
image

Is this a joke? :laughing::laughing:

5 Likes

I know how to switch
But it is opening multiple copies of one screen

This is not working. It is closing only one copy of screen

Fit this on when search_result.Back Pressed.

I know to do this
But how to close all copies of screen at once

This is not how you do this.

do as @OfficialDjJohn told you.

2 Likes

blocks (3)
This works perfectly

I think everything necessary on this topic has already been said.

2 Likes

Then i will close all copies of this topic. :sunglasses:

5 Likes

no it does not, see the notes here App Inventor Tutorials and Examples: Manager Screen | Pura Vida Apps
you should check the contribution of @lxmipaudel as solution…
Taifun

1 Like

Here you go ThreeScreenBackClose.aia (4.2 KB)

Btw, It depends on which components you are using as some need this to work properly