Sending field data to a Google sheet

Creating desktop or client-server database solutions?

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
mov
Posts: 2
Joined: Mon Jul 13, 2015 2:41 pm

Sending field data to a Google sheet

Post by mov » Mon Jul 13, 2015 2:49 pm

I will preface this by saying that I am a complete amateur to this but here is what I am trying to do.

I am trying to create a basic sign in application. I would like a user to supply basic information, name, postcode, purpose of visit etc, which are input in standard text fields. Upon signing in, the user is generated with a generated visitor number, or whatever (could be a green elephant picture; it doesn't matter. It just needs to be a unique identifier up to about, say, 50 possibilities).

Forgetting the unique number/picture bit for a second, I am just trying to grapple with how to get the data out of the text fields and into a google sheet.

The user will then need to be able to recall that data on a sign_out card later user their unique number/picture. So I suppose I will need to be able to reverse this and get data from the google sheet back into something like a data grid. This bit needs to be anonymous - we can't have everyones data showing up here.

I have read some many articles on arrays, and Google sheets that it is making my head spin. Nothing is working. Can anyone help please?

MaxV
Posts: 1579
Joined: Tue May 28, 2013 2:20 pm
Location: Italy
Contact:

Re: Sending field data to a Google sheet

Post by MaxV » Tue Jul 14, 2015 1:02 pm

In your spreadsheet select File - Share and copy the link from the "Link to Share" box.
Then replace the text edit?usp=sharing by export?format=csv. Now the correct code to use is:

Code: Select all

put URL "https://docs.google.com/spreadsheets/d/1zeuTNtVKbpdcH0culcNDoTRPadsdssJrkfZLsmbLFPNs/export?format=csv" into mydb
This way you get the all spreadsheet as a CSV.
Unfortunately, you cannot write directly to the spreadsheet. What you can do, however, is create a Google Form and view the responses as a spreadsheet. So just analyze the HTML of your Form and post data to it. For more information read here:
Livecode Wiki: http://livecode.wikia.com
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w

mov
Posts: 2
Joined: Mon Jul 13, 2015 2:41 pm

Re: Sending field data to a Google sheet

Post by mov » Wed Jul 15, 2015 12:22 pm

Incredibly helpful reply, thank you MaxV. I'll do some reading and report back if I have any issues, or even, if it works!

Post Reply

Return to “Databases”