#1 - Learn how to implement the method in your app.
#2 - Learn how to remove an item from an array.
Trebuchet Method works in public & public with email apps!
COPY THE APP FOR FREE
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
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
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?
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.
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.
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
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.
Thanks Lucas for your kind intervention!
Yes, I absolutely agree, considering the usability of the interface is not the best way; but what I wanted to show was only focused on the possibility of obtaining a result using the input / output of an item from a multiple relation rather than an array and I am sure it is possible to do better in terms of usability.
Of course now that Iâve just seen @Robert_Petitto 's tutorial (đ Rollups, Single Values and JoinLists FROM ARRAYS!), I donât know if Iâm still convinced to stick with Trebuchet Lightâs approach by seeing all that is possible from now on with arrays!
With these new capabilities on arrays, could it perhaps become easy to postprocess the acquired order? (I mean exploding the data of all the rows of an order that are collected in a single summary cell, without resorting to apps script functions but remaining completely in Glide).
It can be yes and I have to study about it!
This world is getting more and more beautiful and I love the way we all fall in love with it!
Thank you again! Have a nice day!
Correct me, now Iâve found a way to explode rows from a single cell and it works very well thanks to the experimental code column.
I hope it goes from experimental to definitive soon