Saving checkbox state in cloudDB and getting it back

Hello everyone! New guy here :slight_smile:
I’ve searched through this forum for posts with the same problem that I am experiencing but I could’nt find anything and for my last resort I decided to ask for help.
So, I’m trying to develop an app that allow you to check “n” checkboxes and when you change your phone or share your list, the checkboxes that was already checked still checked.
I have found a lot of videos that shows how to do that with TinyDB, but tinyDB is local and I was thinking about using cloudDB, but couldn’t find any example.
Here is a little piece of code/blocks that I’m testing. If anyone could give me some light I would really appreciate it.
Basically I have these four checkboxes and when I change the state of checkbox1 or checkbox2 I store the value (true or false) in a local list called CheckboxList (index 1 or 2 of that list depending of the checkbox that I changed). After that I save the “CheckboxList” to the cloudDB under the tag chbState.
When I click the Load button (btLoad) I try to get the values back from the cloudDB and change two other checkboxes state (checkbox3 and checkbox4) to have the same states of checkbox1 and checkbox2 respectivelly but then I get an error in ai2 blocks screen “The operation Checked cannot accept the arguments: , [[true, false]]”.

Thank everyone in advance for any help

1 Like

Try like this:

2 Likes

I just tested it and worked perfectly!
Thanks a lot Tim!

:smiley:

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