App Script OnChange

Hi Gliders,

I can create PDF file, but it’s manually by click run button. And, very happy because Glide page is able to show cool image from the it’s PDF file’s Url.

Then, I need to create app script On Change for creating Invoice PDF fired automatically by input new data from Glide page on certain sheet (“invoice sheet”). I’ve tried some OnChange app script examples from internet. But, they didn’t work well. Still running automatically for all sheets/workbook changes. Any suggestion for doing that?

The last one, is it possible to submit a free page template with app script/google sheet formula? Anyway, thank you in advance. Stay healthy and happy always!

Apps/Pages that rely on scripts, formulas, etc that are not native to Glide are not approved.

Most of the people that get templates from us are non technical people that will get really confused by these types of automations.

2 Likes

Well noted. I’m trying to revise my page template as Glide’s guidelines. Thanks @SantiagoPerez

1 Like

to run triggered function only for change in your invoice sheet… simply make the condition:

var s    =  SpreadsheetApp.getActiveSheet();
if(s.getName() == "invoice") {  //rest of the function

you can add more conditions to narrow down the trigger

1 Like

It’s still running when any changes on other sheets. That’s fine, I’ll try to find another solution.

Anyway, thanks a lot @Uzo

it can’t be… did you put that at the beginning of the function that is attached to the trigger and save it? also, I’m looking at the image of your script… you probably don’t need to separate it with different functions… the first function is not doing anything, it only read 2 values.