Saving to TinyDB & Retrieving the Data

Hi,

i am very new to the app builder, i am stuck at storing and retreiving the data from tinydb. searched for the topic and ws able to find some but still facing the same issue.installed the etinydb plugin but looks like it is for ios (i might be wrong).

Read the db section of the book Working with Lists and TinyDB , but not able to get thorugh.

i have added just one field data to be saved, will add the other data if this is successful.

would someone be able to check my project and let me know where i am going wrong.
New_One.aia (51.2 KB)

Thanks for the help.
Zav

You are wrong, you cannot run extensions on iOS. In any case, you do not need this extension to store and get data.

Basics: Store & Get

image

what more do you need to know ?

Hi TIMA12,

thanks for the reply.
-- Tag "mydata"
value to store --"abc123" these would be the inputs from the users

do i need to provide the text field names manually ?

i've configured the block, below is the picture, but something is wrong here.

thank you
Zavs

that said

labelname.text should be equal to nametext.text. Don't confuse the issue by setting one text value to the other

Tags should be meaningful text, describing what value TinyDB has stored under that tag.

set Tinydb tag 'FINGERS' value to 9
set TinyDB tag 'TOES' value to 10
set TinyDB tag 'HATSIZE' value to 7.5
set TinyDB tag 'OCCUPATION' value to 'carpenter'

Hi,

Thanks for the pointers, was able to modify the blocks and able to see the data on the view screen. below are the blocks.


how ever i am unable to see the saved file , below are the blocks for this.

Have searched forums and read that we might need to ask specific persmission for the external storage but did not get through. https://community.appinventor.mit.edu/t/storageaccess-extension-simplifying-storage-permissions-in-mit-app-inventor/88913/20,https://community.appinventor.mit.edu/t/request-ask-permission-for-read-external-storage-denied/105525/6.
any help on how i can save this to a CSV file locally?
Thank You
Zavs

Your data structure does not work.

Please describe your data with a sequence of sentences of the form

Each ___ has a ___

Fill in the words.

I suggest a spread sheet instead of TinyDB to preserve the data structure.

You turned TinyDB into a cross cut shredder.

Hi ABG,

thanks for the response, you need to have a google developer account if you want to save it in google sheets,is this not the case now ?
i might have done it in a not so optimizsed way as this is my first app, lot of learning is there :slight_smile:
Any other reference where i can jus export this to a csv ?

I have never had to pay Google a cent, and have never been asked for a credit card .

All I have is a Gmail account.

Just store the entire table under a single fixed tag, like 'lens_sales'

Thank you. I was able to use a google sheet and get the data there .

Zavs

Great!

Which technique did you use?

  • AI2 Spreadsheet component and .json file for credentials?

  • Google Form URL for row insertion?

  • Google Scripts?