Join Scott Simpson for an in-depth discussion in this video Alerting the user, part of Learning Google Apps Script.
- Earlier, we saw a little bit about the getUi method…in the context of adding a custom menu to a spreadsheet.…Let's explore that a little further to make some…different Ui elements.…I'll go into my scrip and I'll add another item to my menu.…I'll call it "show an alert".…And I'll call the "showAlert" function.…I'll add a new function for that.…Function showAlert.…And I'll use the spreadsheet app….getUi method here.…
I'll write "var ui equals spreadsheet app…".getUi".…This of course could be replaced by document app…or form app if you're working in one of those.…Let's take a look at some of the methods available here.…There is alerts,…create menu, which we saw earlier,…prompt and a couple of dialogue options.…Show modal dialogue and show modeless dialogue,…which is handy for add-ons that need deeper interaction…than just a dialogue box.…
Let's take a minute to explore alerts.…The first one here, "alert prompt",…is pretty straight forward.…I'll write, "Hi from the alert".…I'll save my script,…and in order to bring up this new menu item…
First, learn how to use simple scripts to edit documents and spreadsheets, work with files in Drive, and find and send messages in Gmail. Then find out how to add custom functionality to your spreadsheets, and build user interface elements for your scripts, using menus, alerts, and dialogs. Finally, Scott shows how to share your work with others by publishing scripts as web apps.
- What is Google Apps Script?
- Understanding script types
- Logging and debugging your scripts
- Scripting common tasks
- Building custom spreadsheet functions
- Creating add-on functionality such as dialogs and sidebars
- Sharing your script as a web app