0

Why does this script not work.

I am trying to get my spreadsheet to display a url in a overlay window when I click my button the script is running but does not open the overlay window. can anyone help this is what I'm dealing with

function tasktracker() {var button = CardService.newTextButton() .setText("tasktracker") .setOpenLink(CardService.newOpenLink() .setUrl("https://docs.google.com/forms/d/e/1FAIpQLSfWmoWs47RRwQRA2k1UfsBt6P7u-Ivl8JyFXZ9OFJ9ZOb4PmQ/viewform") .setOpenAs(CardService.OpenAs.OVERLAY) .setOnClose(CardService.OnClose.RELOAD_ADD_ON));}

manifest file>>>

{ "timeZone": "Europe/London", "dependencies": { }, "exceptionLogging": "STACKDRIVER", "runtimeVersion": "V8" } "urlFetchWhitelist": ["https://docs.google.com/forms/d/e/1FAIpQLSfWmoWs47RRwQRA2k1UfsBt6P7u-Ivl8JyFXZ9OFJ9ZOb4PmQ/viewform" ],"openLinkUrlPrefixes": ["https://docs.google.com/forms/d/e/1FAIpQLSfWmoWs47RRwQRA2k1UfsBt6P7u-Ivl8JyFXZ9OFJ9ZOb4PmQ/viewform"]
  • Welcome to [so]. Pleasa add a brief description of your search/research efforts as is suggested in [ask]. – Rubén Jul 26 '20 at 20:33
  • Card service is not available on Google sheets. It is only for gmail addons – TheMaster Jul 26 '20 at 20:36
  • Thank you for that, is there something similar for googlesheets by any chance? – David Kelly Jul 26 '20 at 20:38
  • Are you looking for [this](https://stackoverflow.com/a/54675103/)? – TheMaster Jul 26 '20 at 20:40
  • Does this answer your question? [Google Apps Script to open a URL](https://stackoverflow.com/questions/10744760/google-apps-script-to-open-a-url) – TheMaster Jul 26 '20 at 20:42
  • I have tried the 2nd script you posted. The script runs but nothing happens I can give it another go in the morning. Thank you for help I will comment tomorrow and give you an update fingers crossed it works – David Kelly Jul 26 '20 at 20:57
  • Hi there @DavidKelly! If the new code doesn't fulfill your goals, could you please share its code so we all can take a look? – Jacques-Guzel Heron Jul 27 '20 at 10:31
  • Hi Thanks for your help everyone i ended up using th following script to get this to work not Quite what i wanted but it works. var htmlOutput = HtmlService .createHtmlOutput('Go to this site for help!') .setWidth(250) //optional .setHeight(50); //optional SpreadsheetApp.getUi().showModalDialog(htmlOutput, 'Help Dialog Title'); – David Kelly Jul 27 '20 at 16:30

0 Answers0