Global single value variable

I want to create a global single value variable that I can use between multiple screens can you advise how ? or show a sample code

Use tinydb for that.. or pass the variable value via start value block(pass and get it in next screen)

1 Like

Can you show a code please

Post what you tried please Asma.

You have three ways:

  • the two Spicy_Topics mentioned
  • using a virtual screen ( where the variable is always passed to any of the virtual screens)

The simplest is to use virtual multiple screens. The variable is always the same.
Next flexible is to use a TinyDB on each of your Screens.
Least flexible is open another screen with start value ScreenName/StartValue.

5 Likes

Thanks for the help.
I managed to use start value block

1 Like

A TinyDB example showing one way to ' transfer' a variable to multiple screens:

Drop a TinyDB control on each of the Screens the variable is needed. There are various other way the TinyDB could be used. What a developer should use depends on his/her app.

Perhaps Asama will post the example he made using the start value block and someone will post an example of using virtual screens to help others learn? :slight_smile:

1 Like

Also, There is an extension.