Page 1 of 1

Save information entered in app to a file on Google Drive

Posted: Wed Mar 26, 2014 9:17 pm
by Chris Flowers

Hello, I have created a very basic app that requests the user enters some information i.e. date, name, comments, role etc. On the last page is a submit button. What I would like to achieve is the information entered is saved to a CSV or text file in a Google Drive account. Can anyone advise how I can achieve this please? Thanks!


Save information entered in app to a file on Google Drive

Posted: Wed Mar 26, 2014 9:48 pm
by Nikita

Hello,

Please look at this link:

https://developers.google.com/drive/w...


Save information entered in app to a file on Google Drive

Posted: Thu Mar 27, 2014 8:57 pm
by Chris Flowers6766842

Hello

Ok thanks for the info. I perhaps need a little more guidance though. I'm a complete novice really, with only some basic HTML coding skills used years back creating website or two!

I guess my question is two fold:

"Once the 'SUBMIT' button is tapped how do I..."

1) "...have the app collate the information entered in to the text boxes, date's, name etc.?"

2) "...then save that collated information to Google Drive?"

I appreciate you kind of answered 2) with that link. I see that I need to apply some code (possibly Javascript) to take care of that.

I've attached the two screenshots of the app.

Thanks again.

Image

Image


Save information entered in app to a file on Google Drive

Posted: Fri Mar 28, 2014 3:55 am
by Illya Stepanov

Hi Chris,

This is brief plan:

  1. You have to add "JavaScript" event handler on your button. See details: http://prntscr.com/34rpd2/direct

  2. In the editor you should:

    2.1 get all fields information in local variables.
    pre
    //Where "input_name" - is name for input.
    var name = Appery("input_name").val();
    var jobTitle = Appery("input_jobTitle").val();
    ....
    /pre
    2.2 Create file content from data you have.
    pre
    var fileContent = "";
    fileContent += "\nname = " + name;
    fileContent += "\njob title = " + jobTitle;

    ......
    /pre
    2.3 Send this file content to google drive with functions described in the given document: https://developers.google.com/drive/w...

    That's all.