1

I implemented a button click workaround feature using data validation in Google Sheets and whenever the trigger gets executed from mobile, it's in "Paused" status. I am displaying dialog box when this trigger gets executed, which, works perfectly fine when executed from the browser.

enter image description here

Code snippet:

function onSheetEdit(e) {
    ...
    var ui = SpreadsheetApp.getUi();
    ...
   
    var result = ui.alert(
      'Confirmation',
      Text,
      ui.ButtonSet.OK_CANCEL);
      ...
      // Executed on OK
      ui.showModelessDialog(
          HtmlService.createHtmlOutput(html).setHeight(20),
          'Redirecting'
      );
}
TheMaster
  • 45,448
  • 6
  • 62
  • 85
RandomUser
  • 1,843
  • 8
  • 33
  • 65

1 Answers1

0

The UI dialog isn't shown using the mobile app, so the script just stays paused waiting for the dialog to be closed. A workaround would be to show the message as an image.

Related questions:

Google Sheets ui access on mobile?

https://webapps.stackexchange.com/questions/87346/add-a-script-trigger-to-google-sheet-that-will-work-in-android-mobile-app

mshcruz
  • 1,967
  • 2
  • 12
  • 12