Forms best practice - Glide Form vs. Google Forms?

Hi all,
Our app is heavily dependent on Google Script. Prior to Glide, we run an OnFormSubmit trigger. Now, we run OnChange trigger. The question is: which form will create this change, Glide Form or Google Form?
Glide Forms
Pros

  1. Naturally much more native to the overall experience for a users who’s already on Glide
  2. Easier to pass values from parent screen.
    Cons
  3. Presumably, less scalable than Google Form. I’ve read several posts here which describe different scenarios in which the Glide Form doesn’t properly trigger that OnChange trigger.
  4. Assuming multiple users will be submitting the same form at the same time, can handle less traffic?

Google Forms
Pros

  1. Google Forms are (presumably) much more reliable and robust.
    Cons
  2. A bit complicated as it requires using pre-filled links with constructed URL.
  3. Looks a bit out of place in comparison to the over Glide experience / UI. If using web-view, it’s a bit less visible, but still not a native Glide screen.
  4. There are no dependent questions.

True, on the face of it there are more pros than cons to Glide Forms. Still, I’m not 100% comfortable with letting Glide replace the good-old Google Forms.
What are your thoughts on this? What are your best practices?
Thanks!

I also use apps script extensively.

I’ve never encountered a situation where a Glide initiated change did not trigger an onChange event in the associated Google Sheet.

The possibilities of race conditions, and multiple concurrent invocations are definitely things you need to be aware of, and code for. Because you’re using an onChange trigger as opposed to an onFormSubmit trigger, your trigger will be fired with every change, not just form submissions. Some practices that I’ve adopted to deal with this:

  • Use a wrapper function for the trigger, identify the sheet that triggered the change (event.source.getActiveSheet()), and short circuit as early as possible.
  • With longer running functions (and even short ones), write a value to the sheet to serve as a gate to stop any subsequent execution from attempting to process the same data before the first run is finished.
  • Use timed triggers in preference to onChange for processes that aren’t time critical

Prior to discovering Glide, I also used Google Forms a lot. These days, I wouldn’t even consider it. I’m sure that there are cases where it might make sense to use a Google Form to feed data into a Glide app, but I haven’t encountered one yet.

2 Likes

Thanks @Darren_Murphy. Very detailed and very helpful.
Indeed, race and concurrent are my main concerns (but not the only concerns).
As we’re talking about forms, each submission is a new row in any given sheet. Isn’t is safe to assume that Google internal code will overcome these concerns if using getActiveCell().getRow();? The idea is to anchor each code run to one single row. Wouldn’t that be considered a good practice?
I’d also like to ask the same question in reverse: Do you see any major drawbacks if using Google Forms (apart from the ones I briefly mentioned)?
Thanks again!

I honestly don’t know about that, and it’s not something that I’ve tested.

I guess the other drawback that you didn’t mention is that when using a Google Form you have to wait until the data syncs to Glide before it’s visible in the app. This may or may not be an issue, depending on the use case.

1 Like