Update the card when close the dialog

29 views
Skip to first unread message

Smart Assistant

unread,
Dec 1, 2022, 7:29:39 AM12/1/22
to Google Apps Script Community
I want to known is there any way to update the card when I close the dialog

//this function is called when click a button in the card
function showDialog() {
  const html = HtmlService.createHtmlOutputFromFile('dialog.html')
    .setWidth(600)
    .setHeight(425)
    .setSandboxMode(HtmlService.SandboxMode.IFRAME);
  SpreadsheetApp.getUi().showModalDialog(html, 'Select the spreadsheets');
}

//this function is called by client code
function callback(text) {
  //updat the card with text
}

Smart Assistant

unread,
Dec 1, 2022, 7:33:04 AM12/1/22
to Google Apps Script Community
My main requirement is in the showDialog, open a google picker to select files, and after select the files, call the callback with selected file titles, and display it in the card, so that the use can see the files they selected

cwl...@gmail.com

unread,
Dec 1, 2022, 9:21:22 AM12/1/22
to Google Apps Script Community
Since this is using html, this video may help you a little. He also shares his code in the description:
https://www.youtube.com/watch?v=OgGC2y6qJCM

He has a bunch of great videos.

Smart Assistant

unread,
Dec 1, 2022, 10:40:42 AM12/1/22
to Google Apps Script Community
Maybe, but didn't find anything useful for me
Reply all
Reply to author
Forward
0 new messages