Data transmission between 2 screens

I am making an application that will take data on the first screen, the second screen will show the data, the second screen will delete the record and update it, and send it back to the first screen during the update. There is a problem somewhere, it does not show the record on the second screen.



can you help me urgently:smiling_face_with_tear:

in screen1 -- save the data in tinydb
in screen2 -- call the data from tinydb
update, edit, delete then again save in the same tinydb
in screen1, use the same tag to call the updated data.

Make it simple and do not make it complex

3 Likes

In addition to what @Spicy_Topics has already said (which is working fine, of course :+1:) , please take a look also to topics related to "virtual screens". it's a way to avoid the loosing of data and the use of the TinyDb. The data can be accessed as global ones.
Best wishes !

Thanks, I was a little confused while making it๐Ÿ˜…

Thanks, I was a little confused while making it :grinning:

Search is always a better option and will increase your learning, coding skill rather than readymade blocks

3 Likes

You should use a DataBase when there is a lot of data to be handled, but it is not necessary to share across Screens (Screens are independent of each other). Instead, you can use Virtual Screens.

When we define virtual screens, we use one 'real' App Inventor Screen (most often Screen1). Screen-sized Vertical Arrangements on it are displayed/hidden as required - they are the Virtual Screens. This is generally a better approach for multi-screen Apps, they share data without having to "pass" it between screens and it also reduces code duplication, making the App more efficient and the code easier to follow if you have to return to it at a later date.

So, instead of separate "houses", virtual screens are "rooms" of the same "house".

In your app, as said by @ChrisWard Virtual screen is ok. Which means just different arrangement within the screen. so you no need to use even tinydb to handle between the arrangements. You can use it for save purpose only

1 Like

Dear @ssees,
as you've seen, all of us is suggesting you to use the "virtual screens" method.
The annexed .aia shows you how.
Kind regards.

MultipleScreen.aia (849.0 KB)

1 Like