Skip to content

Instantly share code, notes, and snippets.

@eojji
Created July 11, 2018 01:12
Show Gist options
  • Save eojji/07957b616a1124aeff075e702021ad3f to your computer and use it in GitHub Desktop.
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
/**
* 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