Created
July 11, 2018 01:12
-
-
Save eojji/07957b616a1124aeff075e702021ad3f to your computer and use it in GitHub Desktop.
google.script.run.getLinkFolderSpreadSheet(); drive 07 - Google App Maker https://cafe.naver.com/eojji/333
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* https://developers.google.com/appmaker/tutorials/call-scripts/ | |
* @param {widget} widget - Button widget. | |
* @param {event} | |
*/ | |
function onListFilesClick(widget, event) { | |
var widgets = widget.parent.descendants; | |
var from = widgets.TextBoxFromFolder.value; | |
var to = widgets.TextBoxToFolder.value; | |
google.script.run.withSuccessHandler( function(resp) { | |
widget.root.properties.ssNameProperty = resp.title; | |
widget.root.properties.ssUrlProperty = resp.url; | |
}).myListFiles(from, to); | |
} | |
function onListFileAttach(widget) { | |
google.script.run.withFailureHandler(function(error) { | |
// An error occurred, so display an error message. | |
if (error && error.title) { | |
widget.root.properties.ssNameProperty = error.title; // status.text = error.message; | |
} | |
}).withSuccessHandler(function(resp) { | |
if (resp && resp.title) { | |
widget.root.properties.ssNameProperty = resp.title; | |
widget.root.properties.ssUrlProperty = resp.url; | |
} | |
}).getLinkFolderSpreadSheet(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment