You mean this? There is a TinyDB for storing data!
I want to do all the things using google sheet. is it possible? if so, please guide me. Thanks
I want to do all the things using google sheet. is it possible? if so, please guide me. Thanks
The login data IS all stored on the google sheet, the tinydb is used for persistent "local" storage of data on the app, in order to reduce calls to the sheet.
This is not my project....
The developer is using a google form to upload data to their google sheet. This avoids having to use a google apps script web app to do this.
In companion, use "Do It" or set variables to labels, to see what data is coming back, if any, then debug from there.
Hi, I already tried this to my project but I still don't know how to prevent adding same username/email. Please help.
It would really help if you provided a screenshot of your relevant blocks including Do it results so we can see what you are trying to do, and where the problem may be.
To get an image of your blocks, right click in the Blocks Editor and select "Download Blocks as Image". You might want to use an image editor to crop etc. if required. Then post it here in the community.
Taifun
Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by Taifun.
This is how to do it but the registration, separated from the login
Hello Tim, i am trying for weeks now w/o success. would you please help if how have time please?
Are you using a Google apps script?
Here's my sharing setup for a Sheets demo:
The viewing for any one was added by me for demo purposes, and is not necessary for the AI2 Spreadsheet component.
hello TIM,
no i am not using script .. i use url to write to the sheet like:
https://docs.google.com/forms/d/e/xxxxxxxxxxxxxxxxxx/formResponse?&submit=Submit?usp=pp_url&entry.1869488340=mydata
should i use script ? which? thanks a lot
You will need a Google apps script if you want to read and write from a restricted Google sheet. Or use the native spreadsheet component.
for my and everyone benefit: if that is correct the please approve .. i mean i should deploy this script and restrict the file ? .. what do you think of this script ?
function doGet(e) {
var ss = SpreadsheetApp.openById("xxxxxxxxxxxxxxxxxxxxxxxxx");
var sh = ss.getSheetByName("Sheet1");
var name = e.parameter.name ;
var age = e.parameter.age ;
sh.appendRow([name,age]);
var sss = SpreadsheetApp.openById("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx");
var shs = sss.getSheetByName("Sheet3");
var serialn = e.parameter.serialn ;
var skl = e.parameter.skl ;
shs.appendRow([skl,serialn]);
return ContentService.createTextOutput("Success: " + name + ", " + serialn + " added");
}
thanks for sharing .. does it mean anyone will the link will be able to view but not to write into or delete ? .. if yes then the only solution to have it restricted is to use script ? .. did i get that all right ? .. please correct me
thank you so much
Is the spreadsheet the same for Sheet1 and Sheet3 ? If so, the script could be improved, also what is that script for, signing up a user ?
The Spreadsheet component can be used with a restricted google sheet, available only to the owner outside of the AI2 app
Dear Tim,
Yes two different sheets within one file but I have no have script writing experience so I tried to modify what I found online from one sheet to two … so I have one google file with two tabs on the down bar (sheet 1, sheet2, sheet3 ) I need to write in some cells of sheet one and 3 .. would you please optimize it .. then should I deploy and get the url of the script then restrict the sheet from sharing and use that script url to read/write to the sheet ? .. am I understanding this right?
Thank you so much
Try something like this: ( I have not tested it...)
function doGet(e) {
var ss = SpreadsheetApp.openById("Spreadsheet ID here");
var sh1 = ss.getSheetByName("Sheet1");
var sh3 = sss.getSheetByName("Sheet3");
// sets data to rows on two different sheets
sh1.appendRow([e.parameter.name,e.parameter.age]);
sh3.appendRow([e.parameter.skl,e.parameter.serialn]);
// ensures spreadsheet operations completed
SpreadsheetApp.flush();
// tests that the data has been written before reporting success...
var lr1 = sh1.getLastRow();
var rng1 = sh1.getRange('A' + lr1).getValue();
var lr2 = sh3.getLastRow();
var rng2 = sh3.getRange('B' + lr2).getValue();
if (rng1 == e.parameter.name && rng2 == e.parameter.serialn) {
return ContentService.createTextOutput("Success: " + e.parameter.name + ", " + e.parameter.serialn + " added");
} else {
return ContentService.createTextOutput("Oops, something went wrong");
}
}
you are better than ChatGPT