Trigger function only if certail cell value changes

31 views
Skip to first unread message

Paarl Bus

unread,
Dec 13, 2024, 12:53:20 PM (8 days ago) Dec 13
to Google Apps Script Community
Our company transports pupils to and from school hostels over weekends and our clients (i.e.parents) have to confirm every week if and when their children will be on the bus.  I have set up a basic booking form with a drop-down for client to select their name, which will add their children's names and 3 checkboxes to the form. They then simply mark the relevant boxes for Friday, Sunday or Not On Bus.  So far, so good. (Eventually a script wi;ll add the booking data to the bookings form but I'm not there yet.) 

I have an OnOpen script that clears all fields so that old data is not displayed.  Then when a new selection takes place in the drop-down, the checkboxes must be cleared. That also works.  But when a box is checked, Sheets regard that as an onChange or OnEdit event and clears the boxes again.  

How should I go about preventing this global trigger? It should not run when the checkboxes change.

Herman

Keith Andersen

unread,
Dec 13, 2024, 1:01:57 PM (8 days ago) Dec 13
to google-apps-sc...@googlegroups.com

OnEdit or onChange ar simply triggers that cause a specific function or functions to run. It is the function(s) that need to be modified to NOT clear content.

Can you share the function(s) attached to the triggers?



My website: https://sites.google.com/view/klaweb/
Passions: God, Family, Scriptures, Learning, Data Management, Google Sheets + App Script and much more!

--
You received this message because you are subscribed to the Google Groups "Google Apps Script Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-script-c...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/google-apps-script-community/b7e09571-c891-4c9e-9213-1752dcbda7c5n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages