# 💫 The Trebuchet Method

**URL:** https://community.glideapps.com/t/the-trebuchet-method/48325
**Category:** Community Resources
**Tags:** tutorial
**Created:** [September 1, 2022, 7:39pm UTC](https://community.glideapps.com/t/the-trebuchet-method/48325 "2022-09-01T19:39:38Z")
**Posts on this page:** 18
**Page:** 1

<div class="post-metadata">

### Author: ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)
#### Post date: [September 1, 2022, 7:39pm UTC](https://community.glideapps.com/t/the-trebuchet-method/48325/1 "2022-09-01T19:39:38Z")

</div>

## 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:

[![](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/8/e/8eeef1e4b18e614e1940ea9fbcd0cafe92fddf08.jpeg "Glide: the Trebuchet Method") ](https://www.youtube.com/watch?v=sFxaGRa7y8E)

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

EDIT:  
I’ve created a new way to trebuchet!

> [@dizzy A NEW way to Trebuchet!](https://community.glideapps.com/t/a-new-way-to-trebuchet/72402):
>
> waving_hand Hey fellow Gliders! If you haven’t heard of the Trebuchet method, it’s a term coined by @Lucas_Pires that refers to creating inline arrays. Inline arrays can be an efficient way to create relations without requiring a helper table thereby preserving your row count! Previously, the Trebuchet method required about 6 columns and 2 custom actions (4 updates to add and remove a single item). This new version of the Trebuchet method cuts that usage IN HALF star_struck (3 columns, 1 ac…

---

<div class="post-metadata">

### Author: ![Killko](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/killko/32/39538_2.png) [@Killko](https://community.glideapps.com/u/Killko)
#### Post date: [September 1, 2022, 9:44pm UTC](https://community.glideapps.com/t/the-trebuchet-method/48325/2 "2022-09-01T21:44:30Z")

</div>

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 ?

---

<div class="post-metadata">

### Author: ![Killko](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/killko/32/39538_2.png) [@Killko](https://community.glideapps.com/u/Killko)
#### Post date: [September 1, 2022, 9:50pm UTC](https://community.glideapps.com/t/the-trebuchet-method/48325/3 "2022-09-01T21:50:46Z")

</div>

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 ?

---

<div class="post-metadata">

### Author: ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)
#### Post date: [September 1, 2022, 11:18pm UTC](https://community.glideapps.com/t/the-trebuchet-method/48325/4 "2022-09-01T23:18:54Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)
#### Post date: [September 2, 2022, 3:03am UTC](https://community.glideapps.com/t/the-trebuchet-method/48325/5 "2022-09-02T03:03:35Z")

</div>

> [@Killko](#):
>
> I mean another user could override the comma separated owners column in between the time you read it and make your own override ?

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

---

<div class="post-metadata">

### Author: ![Killko](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/killko/32/39538_2.png) [@Killko](https://community.glideapps.com/u/Killko)
#### Post date: [September 2, 2022, 8:44am UTC](https://community.glideapps.com/t/the-trebuchet-method/48325/6 "2022-09-02T08:44:17Z")

</div>

Make ?

---

<div class="post-metadata">

### Author: ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)
#### Post date: [September 2, 2022, 8:46am UTC](https://community.glideapps.com/t/the-trebuchet-method/48325/7 "2022-09-02T08:46:31Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![Killko](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/killko/32/39538_2.png) [@Killko](https://community.glideapps.com/u/Killko)
#### Post date: [September 2, 2022, 8:47am UTC](https://community.glideapps.com/t/the-trebuchet-method/48325/8 "2022-09-02T08:47:12Z")

</div>

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

---

<div class="post-metadata">

### Author: ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)
#### Post date: [September 2, 2022, 9:11am UTC](https://community.glideapps.com/t/the-trebuchet-method/48325/9 "2022-09-02T09:11:20Z")

</div>

Yeah, 1MB.

So roughly 1 million characters, depending on encoding.

---

<div class="post-metadata">

### Author: ![Thoughts](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thoughts/32/46790_2.png) [@Thoughts](https://community.glideapps.com/u/Thoughts)
#### Post date: [September 19, 2022, 10:22am UTC](https://community.glideapps.com/t/the-trebuchet-method/48325/10 "2022-09-19T10:22:33Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)
#### Post date: [September 19, 2022, 10:30am UTC](https://community.glideapps.com/t/the-trebuchet-method/48325/11 "2022-09-19T10:30:58Z")

</div>

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

---

<div class="post-metadata">

### Author: ![Thoughts](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thoughts/32/46790_2.png) [@Thoughts](https://community.glideapps.com/u/Thoughts)
#### Post date: [September 19, 2022, 10:33am UTC](https://community.glideapps.com/t/the-trebuchet-method/48325/12 "2022-09-19T10:33:13Z")

</div>

Ha, I see- got it. Thanks.

---

<div class="post-metadata">

### Author: ![mikec](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mikec/32/53291_2.png) [@mikec](https://community.glideapps.com/u/mikec)
#### Post date: [March 16, 2023, 3:23pm UTC](https://community.glideapps.com/t/the-trebuchet-method/48325/13 "2023-03-16T15:23:29Z")

</div>

Hey @Robert_Petitto, have you ever run into lags when using the trebuchet method?

I had setup a multi-state button block (e.g. _Want_ and _Don’t Want_) using trebuchet, there was no lag for a long time. But all of sudden, it started to lag after yesterday.

I am trying to find the cause for this lag, maybe because I upgraded to the new reusable actions? Curious if you have any quick solve for this. Thanks!

**UPDATE:** Found the problem, if you enabled _ **Recent Runs** _ in new Actions tab, it’s causing serious lag for trebuchet method.

---

<div class="post-metadata">

### Author: ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)
#### Post date: [March 16, 2023, 5:25pm UTC](https://community.glideapps.com/t/the-trebuchet-method/48325/14 "2023-03-16T17:25:13Z")

</div>

Interesting. Good to know and probably shouldn’t be the case. @Mark @Jason ?

---

<div class="post-metadata">

### Author: ![r2e2](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/r2e2/32/56625_2.png) [@r2e2](https://community.glideapps.com/u/r2e2)
#### Post date: [February 10, 2024, 9:23pm UTC](https://community.glideapps.com/t/the-trebuchet-method/48325/15 "2024-02-10T21:23:41Z")

</div>

is this replaced with the data structures integration and set modifiers?

---

<div class="post-metadata">

### Author: ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)
#### Post date: [February 11, 2024, 3:54am UTC](https://community.glideapps.com/t/the-trebuchet-method/48325/16 "2024-02-11T03:54:50Z")

</div>

It can be! I also found that using a multiple files column + make array column + remove element column works quite nicely as well.

I’ll be sure to make a new video.

---

<div class="post-metadata">

### Author: ![r2e2](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/r2e2/32/56625_2.png) [@r2e2](https://community.glideapps.com/u/r2e2)
#### Post date: [February 13, 2024, 3:28am UTC](https://community.glideapps.com/t/the-trebuchet-method/48325/17 "2024-02-13T03:28:32Z")

</div>

I started using the add/remove element for social like/follower lists, then using ai to convert to a list I can relate (is there another way to convert json to lists?). looking forward to the new video. you’re the man Robert 🙂

---

<div class="post-metadata">

### Author: ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)
#### Post date: [February 13, 2024, 8:14am UTC](https://community.glideapps.com/t/the-trebuchet-method/48325/18 "2024-02-13T08:14:08Z")

</div>

> [@r2e2](#):
>
> I started using the add/remove element for social like/follower lists, then using ai to convert to a list I can relate

This sounds like sth JavaScript can do, maybe you can ask ChatGPT to write a function for you?
