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
function getGroupRoleByUserEmail_(email) { | |
var gfolderCopyGroupEmail = PropertiesService.getScriptProperties().getProperty('gfolderCopyGroupEmail'); | |
try { | |
var group = GroupsApp.getGroupByEmail(gfolderCopyGroupEmail); | |
return group.getRole(email); | |
} catch(e) { | |
console.warn('Error %s, %s, GroupsApp.group.getRole()', e.name, e.message); | |
} | |
} |
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
function drivePermissionsInsertByEmail_(email, id) { | |
// https://developers.google.com/drive/v2/reference/permissions | |
var value = email; | |
var type = 'user'; | |
var role = 'organizer'; | |
var resource = { | |
'value': value, | |
'type': type, | |
'role': role | |
}; |
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
function pacProcessForm_(url, pickAndCopyFolder) { | |
var appMessage = {}; | |
appMessage.message = 'Pick and Copy data'; | |
var thisName = 'PaC Process Form'; | |
appMessage.title = thisName; | |
appMessage.url = url; | |
var id; | |
var rtn = url.match(/[-\w]{25,}/); |
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; |
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; |
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; |
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
function onMainPageAttach(page) { | |
google.script.run.withSuccessHandler( function(resp) { | |
page.descendants.ToFolderLink.text = resp.title; | |
page.descendants.ToFolderLink.href = resp.link; | |
}).getLinkToFolderByProperty(); | |
} | |
/** | |
* @param {widget} widget - Button widget. | |
* @param {event} |
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
function onDropdownAttach(widget) { | |
var props = app.currentPage.properties; | |
google.script.run.withSuccessHandler( function(list) { | |
if(list && list.length > 1) { | |
var listLength = list.length; | |
for(var i = 0; i < listLength; i++) { | |
var drive = list[i]; | |
if (drive.id == props.TeamDriveId) { | |
widget.value = drive.id; | |
} |
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
function myFunction() { | |
var ss = SpreadsheetApp.getActiveSpreadsheet(); | |
var sheet = ss.getSheets()[0]; | |
var value; | |
var i = 0; | |
var thisRow = 2; | |
do { | |
value = sheet.getRange(thisRow, 1).getValue(); | |
if (value) { | |
thisRow++; |