Use a Google Form to let people add new entries to your spreadsheet

Follow

Comments

11 comments

  • Avatar
    Fev Ramireli

    I'm trying to use your script but I keep getting the same error in line 7:

    var data = sheet.getDataRange().getValues();

    getDataRange null

    I already checked and double checked the variable sheetName, but since I just inserted the code and I'm by no means a coder or programmer, I don't know what to do.

    Attached a ss for more deatail

  • Avatar
    Awesome Table

    Hello Fav Ramireli,

    Could you create a ticket for your issue? Please, share your view and your spreadsheet.
    Make sure you also give access your spreadsheet at "support@awesome-table.com". 

    Thanks in advance.

    Thomas

  • Avatar
    Fev Ramireli

    Thank you for the follow up, my Awesome Table its working like a charm.

  • Avatar
    Bill

    On function geteditresponseurl line

    var columnIndex = SpreadsheetApp.getActiveSpreadsheet().getRangeByName("Update").getColumn().toString();

    I'm getting

    TypeError: Cannot call method "getColumn" of null. (line 36, file "Code")

  • Avatar
    Thomas Morin

    Hello Bill,

    You need to reproduce the exact code we mention in the article above. Your code is not the same in this article.

    The var columnIndex allows you to attribute the column where you want to put the link like this:

    var columnIndex = 8 ;

    Finally, the var sheet must be like this:

    var sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName(sheetName);

    Please, apply identically the code we provide in this article and your view should work.

    Thank you for your understanding.

    Thomas

  • Avatar
    Harvest Church

    Hi there,

    I have an inventory that I'm trying to use this script on. I've created a view, I already had the spreadsheet, I have a form as well and configured the form responses tab in the spreadsheet. When I run the script it runs through but doesn't generate any links in my spreadsheet. No errors when I run the debugging script and if I open up the form and input some data it generates a link. I added just a few rows, but I have a thousand lines of data I'd like to import and from what I gathered this script was supposed to auto generate links for every line?

  • Avatar
    Awesome Table

    Hello,

    This script is made to only generate edit URLs from responses that are directly coming from Google Form that is why it is neither generating urls nor displaying any errors.

    Nicolas

  • Avatar
    Cat Russell

    Hello, I really am loving this tool. 

    I have my table working with a template and have the update links inserted which are working as well. Yay.  

    But in some of the examples, there is an "add entry" or "add row" button at the very top of the example (view) which opens the form for a new entry via the Google Form. 

    How do I add that to my view? I can't seem to work it out. 

    Thanks

  • Avatar
    Awesome Table

    Hello Cat!

    Sorry if our documentation was not clear enough!

    You can add any HTML on top of your Awesome Table view using templates.

    Here is how to configure a template sheet:https://support.awesome-table.com/hc/en-us/articles/115004170225--Part-2-Set-up-your-template#2

    Here is how to have a header: https://support.awesome-table.com/hc/en-us/articles/115001118689-Add-a-header-on-your-view-and-build-advanced-templates-with-CSS-and-Javascript#3

    From then you can simply add an HTML button with a link to your Google Form.

    Please let me know if I can help you with this.

    Regards,

    Nicolas

     

  • Avatar
    Joseph Vaughan

    It seems that one also needs to enter text in a cell alongside the prefilled URL, such as "Edit Entry".  Otherwise, the button doesn't show up for each row.   Perhaps it would be a good idea for the script to do that too? 

  • Avatar
    Nicolas Gauvin

    Hello Joseph,

    We wanted to keep this article very simple, not talk too much about the graphical aspect.

    Indeed, you will need to create an HTML template with a button with some text included, with a marker for the Update column.

    Please let me know if you need any help.

    Nicolas

Please sign in to leave a comment.