I'm trying to add entries to the menu of a Google Sheet:
ui.createMenu('Push to Sheet')
.addItem('Texas', 'menuItem')
.addItem('Illinois', 'menuItem')
.addToUi();
In the callback function menuItem
, is there any way to capture the name of the selected option (i.e. 'Texas' or 'Illinois')? If possible, this would serve as a marker to replace the inability to send parameters using the UI service.