Switch value not getting stored in TinyDB

I just want to store switch value in TinyDB and get that value every time that screen is opned.
I used that switch to keep sound on and off.

In screen initialize
222

then
111

then checking the value
444

It is not working, can anyone tell me where I am going wrong ?

Where are you storing the value of global is checked?

I searched on the platform but my problem did not resolve, then only i created the topic
I just used same logic told by @bodymindpower

No, you didn’t,
because you saved it to a global var with an empty string.

2 Likes

Please correct me, where I am going wrong ?

You created a variable but you should hover on is checked and there you will get is checked variable

1 Like

grafik

2 Likes

Ohh, Now I got it, I thought it was a global variable.
Thank you for correction

Simplified blocks, no need to do if else…

same thing for this

bild

2 Likes

Thank you for the inputs @Boban

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