[Advanced] Trebuchet Method 🔗 - List of Items/users in one cell!

#1 - Learn how to implement the method in your app.

#2 - Learn how to remove an item from an array.

:star: Trebuchet Method works in public & public with email apps!


Points of attention:

  • We gotta pay attention in the minimal details because in almost every time we’re adding informations to another place, and all the columns must have values in every row (like tamplate, IFE, join list, split list), so when we click, our “current” row pick the info to set column wherever we want

I already did absolutely the same solution in my app)) but it seems complicated

But did it work?

Well, if you want just an action/feature to add/remove from an array as we did, I guess first of all people should use it a lot!
Maybe with trebuchet method this can easily increase the number of devs to use in their apps, helping the Glide Team to think in a “easy & faster” way to do the same



1 Like

@Lucas_Pires, that’s a really smart solution!

It’s even possible to easily change the amount of an item it it already exists in the cart.

In the end I would need to have each cart item as a separate row in a cart sheet. Do you have an idea how to get this done without a script in google sheets?

1 Like

If you need this, then you don’t need the Trebuchet method. Use Add Row button to add the lineitem to the sheet rather than the setColumn used in the Trebuchet method to append the CSV cell.

@Robert_Petitto yes I’m doing this already.

Adding new articles is easy in both ways. But changing the number of an article seems easier if everything happens in the row of that article.

Otherwise you have to find out if a specific article is already in the cart sheet and then add a new row or change an already existing row. Which needs relations between the two sheets and might be slow if those sheets are large.

Hi @Lucas_Pires .
I was very intrigued by this method that you and @Robert_Petitto have developed to save the amount of rows eaten by an order, and I like the idea of ​​containing all the data in a single row, especially like thinking about the overall performance of the application.
I congratulate you, and I state that I do not know if I am arriving on the last train or not on this subject.
So I experimented with it last night and and it seems to me that it could be simplified by using the entry and exit of an item from a multiple relation rather than an array.
If you use relationships rather than constructing an array, you can easily change the quantity of an item that has been placed in the cart, for example.
Using a third support table (in my APP the Splash table) carry out all the logic, brings some advantages, one of which is to avoid worrying whether the user is authenticated or not; obviously it then depends on the scenario that is going to be developed (in this case it is only to demonstrate that it can also work for unauthenticated users with the same logic).
I must say that I have not tested this logic in an exhaustive way, so I don’t know if it is perfectly reliable, also because I make heavy use of column writings through single relation; so I have some fears in terms of reliability.
Let me know what you think if you feel like taking a look at how it works. What advantages / disadvantages can there be using this method I have proposed?
Thank you very much for your eventual attention.

Trebuchet Light 1.0 · Products · Made with Glide (glideapp.io)


This is much easier…yes, but it doesn’t save rows.

1 Like

With ‘it doesn’t save rows’ do you mean that it is not possible to retrieve order rows (to post-processing it) from the Summary Column? In this case, yes I agree (of course this is possible outside of Glide, and this is why the recorded orders table is a google sheet and not a Glide table) - I still haven’t found in Glide a way to explode in rows a two-dimensional array, maybe with current tools it doesn’t exist. If it exists I’d like to know! But even with the Trebuchet method it is not possible to do this, can you confirm me?
Many thanks for your answer Master @Robert_Petitto :wave:

Hey @Roldy I was off this weekend. Stopped just now to read better what you sent here.

Talking about the way you use the same screen of the product to edit the amount is good in the point of development. As you named it as Light, for instance.

But talking about usability, Idk if it’s the best way, you know? I myself found it confusing a bit. Maybe including some informations to make it clearer to the user, could help, but yeah, it’s a good way to do it.

The way I use nowadays is similiar, but the user edit in the product in the cart. A link to screen open the same row, but more like a “edit screen” you know. To be different and the user realize that they are in different screens.

Really good app!

That’s the way I’m using nowadays :point_down:t3: