Google Apps Script Alert - Deep Dive

Поділитися
Вставка
  • Опубліковано 26 сер 2024

КОМЕНТАРІ • 19

  • @programador-visual
    @programador-visual 2 роки тому

    similar to sweet alert, very cool :)

    • @saperis
      @saperis  2 роки тому

      Thanks for watching and commenting. 😀

  • @sezginbulut44
    @sezginbulut44 2 роки тому +1

    Hello there. If you call the onopen function instead of refreshing the page every time, new submenus will be added to the menu. :)

    • @saperis
      @saperis  2 роки тому +1

      Calling it instead of triggering it. Thanks for the suggestion. 😀

  • @sellux_pro
    @sellux_pro Рік тому

    CAN I RESTRICT A MAKE A COPY WITH EDITORS PERMISSION?

    • @saperis
      @saperis  Рік тому

      No, editing rights means that person can change anything in the document or in the Apps Script project. There is no way of restricting them to only change certain things.

  • @yusufimt1834
    @yusufimt1834 Рік тому

    Hello , could you make Alert if Cell value below zero? it will very helpful Thanks before

    • @saperis
      @saperis  Рік тому

      You would have to write a script that does that.

  • @datafeedimplementationspec7704

    Is it possible to use an alert button (let say "Yes" for instant) to trigger the "Make a copy" of the file -, I would like to alert my users the moment they open my protected google sheet to make a copy of the sheet as not all of them will click on (file > make a copy).

    • @saperis
      @saperis  Рік тому +1

      In theory, yes that is possible. But it doesn't solve the problem you are facing.
      Making a copy of that document when they click on "Yes" means they will still be in the original document. You can't force them out of that document and onto the copy.

    • @datafeedimplementationspec7704
      @datafeedimplementationspec7704 Рік тому

      @@saperis yikes! - yh not what I want. I run a couple of alternates and I’ve resulted in providing the instructions in the alert instead That should do for now.

  • @pippofranco767
    @pippofranco767 Рік тому

    on an independent html file of an app script project, this mode you explained doesn't work.
    I tried with allert("message"); but in this case it works even with an annoying writing at the top which seems to be the link to the html page. Do you know how to fix the problem?

    • @saperis
      @saperis  Рік тому +1

      No, not without seeing the file. But that is a service I can't provide. Check Stackoverflow where you often find good input.

    • @pippofranco767
      @pippofranco767 Рік тому

      @@saperis Thanks anyway.
      I managed to solve using AI suggested html code and app script.

  • @Leover378
    @Leover378 2 роки тому

    Uhhhh no entendí del todo. Que uso le podemos dar a estas alertas? Me gustaría saber si cada vez que se abre un sheets o un docs (compartido o no), puedo saberlo mediante correo de gmail.

    • @saperis
      @saperis  2 роки тому

      Puedes avertir la persona de qualquier cosa. Depende de que tu script tiene que hacer.
      La metoda "onOpen" no puede mandar correo de Gmail. Pero tal vez puedes crear un script que checkea sheets o docs cada hora para ver se han cambiado.

    • @Leover378
      @Leover378 2 роки тому

      @@saperis Mas que verificar si se han cambiando cosas en la hoja, quiero es saber si solamente lo han abierto.

    • @saperis
      @saperis  2 роки тому +1

      @@Leover378 No veo esa option en la documentation de Google Apps Script.

    • @sezginbulut44
      @sezginbulut44 2 роки тому

      ```
      function onOpen(){
      Logger.log(Session.getActiveUser().getEmail());
      }
      function onEdit(){
      Logger.log(Session.getActiveUser().getEmail());
      }
      ```
      You can try to print the result that returns a hidden page by taking this code as an example.
      I think you can send an e-mail with onedit. need some work :)