💫 The Trebuchet Method

In certain situations, a single column has the potential to replace an entire table of data.

The Trebuchet Method allows you to create an inline array that allows you to create a SIMPLE one-to-many relationship between two sets of data without the need of a log or submissions table.

Examples:

  • Who owns which item
  • Who has registered for an event
  • Who has completed which task

Pros:

  • no app bloat
  • no additional rows of data
  • fairly easy to set up

Cons:

  • Can only track one data point (eg. who has which item, but not when, how many, etc.)

Take a look at the video tutorial below to learn how leverage this powerful technique in your own app:

Thanks to @Lucas_Pires for his innovation and for coining the term “trebuchet”.

6 Likes

This is really cool @Robert_Petitto, and could really save me a bunch of rows…
However I have an additional dimension I can’t figure out.
Say I have 10 different classes that each occur every week for 5 weeks.
So I’d like to which users checked-in into each class every week. I thought I could just have 5 columns for each week, but how do I go about selecting the right column each week to collect check-ins ?

Also, isn’t there a risk if several users change the Trebuchet column at the same time, that some data could be lost ?

I mean another user could override the comma separated owners column in between the time you read it and make your own override ?

You’re right on both of your posts.

  1. The trebuchet method isn’t designed to handle two related data points (in your case user AND week). The best you could do is to have a go between sheet of weeks. You’d need each of the 10 classes per week (50 rows). Then, you’d write the checkins on the appropriate row.
  2. The trebuchet does have a gap where two users could attempt to write at the exact same time. Most of the time it’s harmless and one user will just have to click a button twice to see you there change take affect. Some more critical situations in terms of assigning doctors to patients or for time sensitive recordkeeping, youd definitely want to use a log rather than the trebuchet method.
1 Like

It’s possible to work around this by delegating the update to a 3rd party, eg. Make.

Make ?

Otherwise known as Integromat.
So instead of a Set Column Values, you trigger a webhook with an appropriate payload and do the update with Make (either in the Google Sheet or via the Glide API). This way, you can ensure that updates are serialised and no collisions can occur.

Btw, there’s got to be a limit in the size of a text column, right ?

Yeah, 1MB.

So roughly 1 million characters, depending on encoding.

1 Like

If we use Make, it still means that two users might send two different “owners+me” lists to update the cell of owners.
How does using a 3rd party resolves this?

Make would keep its own copy of “owners” in a Data Store, and then just add “me” one at a time.

1 Like

Ha, I see- got it. Thanks.