Query about tiny db in mit app inventor

i save info in tiny db in screen 1. Can i call the same tiny db in screen 2? Different screen

Yes, you can once the namespace in all screens is the same.

what is means by the argument [] are the wrong number of arguments for get value?

1 Like

Take a look at this, maybe it can help you.

Are you getting any error ?
If yes, please provide the screenshot of the error and images of the blocks.

Did i put the right block for call tinydb 1 from screen 1 to screen 2?

below is the error message i got

1 Like

only this one block of getvalue on this screen ?

Show the SetValue block on the Other Screen.

Also, make sure that the namespaces for both the TinyDB are same.

Also, try changing the valueIfTagNotPresent value by not keeping it empty.

(I don't think that might be the problem. But its best to try everything.)

1 Like

Hello Wong

You have your logic a bit out. You do not need 'not' and 'is empty':

1 Like

Ya but, the error message shows that the GetValue Method has only one argument.

Do you think you know the reason ? :thinking:

Potentially two or more values in a List, which would not fit the Phone Number block requirement, but I don't really know. When the Blocks have too many issues, the error messages used are not necessarily correct.

1 Like

When things get this far off kilter, I look for a Companion version mismatch.

1 Like

this is the other screen where i save the info in tinydb

ermmm what should i put?

any expert can help i can share the aia.file..

GuardianData is a list.

In the ValueIfTagNotThere block, you have set it to a String. This "may" lead to complications.

Rather use a create empty list Block there.

Can you share it publicly ?
If yes, share it.
If no, make a demo aia which has the same problems and share that here.


WomenSafetyApplication.aia (3.1 MB)

1 Like


First of all "guardianData" is a list of Dictionaries in the Guardian screen.

Secondly, in the Guardian Screen, you set the ValueIfTagNotThere to empty text, which should be changed to create empty list.

Lastly, the biggest mistake you've made is, you tried to set the value of Texting1.PhoneNumber to a list of Dictionaries  !!!!!
And then, you thought it as a text string value and tried to check if it is empty or not.

 Correct these mistakes. Specially the last one, which is the biggest mistake. 

1 Like