T
T
tim_iz2021-08-25 17:32:36
Google Apps Script
tim_iz, 2021-08-25 17:32:36

How to write your modal window?

I work with Google Spreadsheets and make an addition, it displays a Google disk modal window through a picker and selects a table whose sheets are added to a separate list for consolidation, but the problem is that the table does not want to be added to the list in any way? here is my spreadsheet https://docs.google.com/spreadsheets/d/1XzGtlhZ-AP...

files that are being parsed at the moment:
_file_picker.js.html picker description getsheetnames.gs model.window.html
$ code.gs no way I can’t find what the problem is, despite the fact that when I inserted a window with a Google drive into the sidebar itself, everything worked, but it doesn’t work with a modal,


As a result, I was told what needs to be done: it is necessary that after the side bar and modal, when calling Picker, a new custom modal appears and Picker is already on it. but it doesn't work for me

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Ivanov, 2021-08-27
@oshliaer

The main idea is to call a function on the server to open a new dialog

document
  .getElementById('btnShowModalDialog')
  .addEventListener('click', (e) => {
    e.preventDefault();
    google.script.run.showModalDialog();
  });

Working example
Note that after your dialog has finished you will need to store your data somewhere, and force the sidebar to retrieve that data.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question