Is it possible to get the Ui of the active sheet using a trigger which is activated by another sheet?
I want to showSidebar()
in a sheet called Tech Dashboard
whenever a form is submitted to the sheet called ICU Request Form
.
The Tech Dashboard
is always going to be the active sheet and my sidebar just shows a notification onFormSubmit
function showSidebar() {
var ui = HtmlService.createTemplateFromFile('Sidebar')
.evaluate()
.setSandboxMode(HtmlService.SandboxMode.IFRAME)
.setTitle(SIDEBAR_TITLE);
SpreadsheetApp.getUi().showSidebar(ui);
}
I'm aware you can't invoke the Ui from a sheet other than the active one so i was hoping for a workaround.