Send data to a different screen


I have made a application and I want to send data from Screen3 to Screen1 without going to Screen1, instead going to Screen2.

RR Media

You can use TinyDB to store the data before going to Screen2, then go to Screen2. You can get the data with another TinyDB in Screen1.

Gordon is correct but it's not "another" TinyDB, it's an instance of the same TinyDB. Just drag TinyDB to the Screens that require access to it. Don't rename it and don't rename the namespace.

1 Like

Does a TinyDB tag work for all screens?

1 Like

if the data is not so big you can use the below block to send the data on Screen 1.

You should use the below block to retrieve the data on Screen 2.


you can create an array to share more than one variable.



1 Like

Yes. All of the screens use the same TinyDB.

For more details, see the documentation.

You cannot use the TinyDB to pass data between two different apps on the phone, although you can use the TinyDB to share data between the different screens of a multi-screen app.

1 Like

To get the same TINYDB, the NAMESPACE should be same in both screens right?

I don't think so.

Then how do you send it with tinyDB? Can you please share a picture of the code or something?

Sorry for the inconvenience!

  1. Add a TinyDB component in Screen1 and Screen3.

  2. In Screen3, before going to Screen2, do this:


Then, in Screen1, the data will be like this:


Note: You must store a value before getting the value, else the system will return the socket 'valueIfTagNotThere'.

1 Like

Thank you much! @Gordon_Lu and @ChrisWard

1 Like

Yes! The TinyDB name and the namespace must be identical for every instance. They are by default.

1 Like

Thank you for the information. Though it is not what I needed. Still, it is really nice of you to send it through :grinning:

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