1

How can I make a button on one spreadsheet trigger a prompt to open up on another spreadsheet? From my research, the best method is to use a "library" that is shared between both scripts for each spreadsheet; however, I cannot seem to find any videos/examples/tutorials showing what commands/syntx are used to do such a thing.

Can anyone point me to a good example or explain how to do this?

  • Welcome to [so]. Please show what you tried and be more specific about your research. If you found related questions here add the link to the most relevant and describe if they are answered and what you learned from them or where do you get stuck. – Rubén Aug 13 '21 at 00:36
  • There is no way for a script to get access to the UI of a different spreadsheet. For this purpose you would probably need to work around this by saving a value to a file that scripts in both sheets have access to and have a trigger check that value and show the alert. However, looking at your question, I think you might need to rethink your workflow. Why do you need to do that? – Dmitry Kostyuk Aug 13 '21 at 11:33
  • @DmitryKostyuk I wanted to make a "list veto" function where two different people submit their vetoes one by one: https://stackoverflow.com/questions/68706399/is-it-possible-to-have-a-prompt-show-up-for-one-spreadsheet-when-activated-by-an I asked this question beforehand, but it was too much at once and wanted to focus on something simple such as generating the prompts on separate spreadsheets. I would not need the UI answers to be used for each spreadsheet, as I would set the value of a cell, and "onEdit" would trigger a library in the other sheet that initiates a prompt. Not possible? – Graham Palermo Aug 13 '21 at 18:39
  • You know what: I have a better idea: rather have the spreadsheet script send a trigger to another via a libray/web app, have each spreadsheet prompt for replies, then use a trigger to pull data via ImportRange from the other spreadsheet ID. I can still have it say "send response" but really it is just pulling data, which each user will not know. Each user can notify each other when his/her selection is made, therefore there is no need to create an advanced trigger mechanism. – Graham Palermo Aug 16 '21 at 17:23

0 Answers0