TinyDB to Spreadsheet

In the discussion forum I found a tutorial how to synchronize tinyDb with a spreadsheet and tried to create a block according to the example. I can’t find a way to make part of the circled block, please help to solve the block. Sorry newbie, thanks

you are sending data to gsheet based on offline and online , here the index refers from the list of tiny db which one need to go…

thanks for the response, I’m starting to understand. How to show “index” in sendData procedure?
A

see here how to add an argument
https://appinventor.mit.edu/explore/ai2/support/concepts/procedures
Taifun

Thanks, i got it

Click on the settings symbol like in the procedure block which as called as mutator and drag as much as you required and change the name as per your wish… simple

I’ve finished with block, but data not uploaded to spreadsheet. Any solution?




4

Script :
function doGet(e) {

var ss = SpreadsheetApp.openById(“1oHI1napAIF320F-BA4b-kKEBcR3dEJ9hVZalk_E-eJ4”);
var sh = ss.getSheetByName(“Input”);

var NIK = e.parameter.NIK ;
var NAME = e.parameter.NAME ;
var DATE = e.parameter.DATE ;
var TIME = e.parameter.TIME ;
var STATUS = e.parameter.STATUS ;
var NOTE = e.parameter.NOTE ;

sh.appendRow([NIK,NAME,DATE,TIME,STATUS,NOTE]);
return ContentService.createTextOutput(“Success” );

}

Have you tested the script url in browser with some default value like
scriptUrl?NIKE=nnnnn&NME=nnnnn&…
like …?

Yes, testing with url browser is success

Then in app, connect with companion and do the work then drag web url property block , right click on it and click the do it. If it shows values check the requesting url

Or post the testing aia here or in pm to find out your the mistake

Here aia file and my test spreadsheet link

syncTinyDB.aia (6.1 KB)

here is the mistake

this is correct

Now check your sheet… I have sent three list of datas

Thanks a lot for your solution :slightly_smiling_face:

Hy master, Is possible using this method if using image picker as data input?

yes but if the user android version is greate than 10+ then you have to follow different pattern

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