I have a doubt about the spreadsheet tutorial from puravidaapps

hello @Taifun,
I read a tutorial from puravidaapps but i haven't delivered it.
The tutorial is this: https://puravidaapps.com/spreadsheet.php#source
when i see the Page source, i don't find listitem or the questions keys. I have done an app that really created a response when i seen it on google forms, but all responses was "left empty" What can i do

please post your page source, then we can have a look together
Taifun


Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by Taifun.

This is the link to the page that you can then view the page source:
https://docs.google.com/forms/d/e/1FAIpQLScLwOAzwBrbWmEj4nyz7GUXAVhmCt91gG9FMxHsSNH2vpyTew/viewform

it looks like Google changed the logic? I also can't find the listitem anymore in the sources of the page... I have to do some more investigations... probably @TIMAI2 does have an idea?

Taifun

What to do:

  • Open the Google Form in Edit Mode
  • Click the 3 dot menu and select Get pre-filled link
  • Fill out the fields in the form opened with sample data
  • Click on Get Link button at the bottom
  • Click on the COPY LINK words in the popup
  • Paste what you have copied into a text editor

You should then see all the "entry" markers with the numbers for each, and your sample entries

Take it from there :+1:

2 Likes

@TIMAI2 Ok, it worked well :+1:
I discovered how to get the entries via page source:
First, click view page source on the live form.
Then, Ctrl/command + F and search for the titles of the questions.
3 OR 2 results should appear( can appear more if the questions title is similar to the form title). In both cases, the first is the one that we will use:


The entry number is marked with stars. Now, add entry. before that number, on this case, use entry.40926689
If you check the other way(pre-filled link) you will get the same.
@Taifun i think is better uptade your puravidaapps :wink:

@GuiM_Haes

That is the hard way.....:wink:

done, I updated the tutorial and replaced my method by the method from @TIMAI2...
Thank you!

Taifun

You continue talking about listitems...

You can find the Post Url in the form action tag of the page source and the 4 list items.

1 Like

Thank you, fixed.
Taifun

Sorry, but i tested just now and it doesn't works!
Same problem than on the start!
sample aia:(unfinished)
YourMap.aia (7.8 KB)

Try with a GET request ?

image

https://ai2.metricrat.co.uk/guides/use-ai2-to-directly-submit-google-form-data

also it would help to add a Web.GotText event ...
how does your response content look like?


(draggable block)

Taifun

I tryed now again, does not works...
i will try now using Google apps scripts.

Hello, and... finally, it worked!
Google apps script based on:
https://ai2.metricrat.co.uk/guides/post-data-to-a-google-sheet
I adjusted it to my collumns, and removed "sheet" variable, because it don't worked, "ss" has worked
My method:

Blocks

Google apps script

function addSheetDataRow(e, sheet){
var PhoneNumber = e.parameter.PhoneNumber
var ToShare = e.parameter.ToShare
var Action = e.parameter.Action
var Latitude = e.parameter.Latitude
var Longitude = e.parameter.Longitude
var Altitude = e.parameter.Altitude
var Adress = e.parameter.Adress
sheet.appendRow([PhoneNumber, ToShare, Action, Latitude, Longitude, Altitude, Adress])
}
function doGet (e) {
var ss = SpreadsheetApp.openByUrl("https://docs.google.com/spreadsheets/d/1u-pYs55SpB-X39_kblHtt4ue3HDEB9cXMOwAjPvOuKs/edit#gid=1182466262");
addSheetDataRow (e, ss);
}
function doPost (e) {
var ss = SpreadsheetApp.openByUrl("https://docs.google.com/spreadsheets/d/1u-pYs55SpB-X39_kblHtt4ue3HDEB9cXMOwAjPvOuKs/edit#gid=1252746804");
addSheetDataRow(e, ss);
}
//Thanks to Tim for help with some code.

@TIMAI2 and @Taifun please consider changing your websites, because i tried every method i seen and nothing worked, just my one.

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