đŸ’«đŸȘ— JSON Trebuchet

:wave: Hey fellow Gliders!

Part two of my Trebuchet series is live!

Last week, I posted a tutorial on a new way to create inline arrays using the Trebuchet method

Part 2 is a deep dive on how you can Trebuchet more than a single value by creating arrays of JSON :exploding_head:.

Check out how to build an inventory ordering app using the JSON Trebuchet Method!

:popcorn:Enjoy!

17 Likes

Box office stuff every week.

Maybe I’ll just call it Bob office from now.

5 Likes

I’m trying to get back into a cadence of one video every 2 weeks or so :sweat_smile:

3 Likes

Great stuff. 45 minutes that can save thousands of rows. Thank you!

2 Likes

Simply amazing, thank you so much


Is it possible to make and distinguish orders for different projects?

If possible, what would be they best way to stucture the work flow as I’d like to use this method to create order lists for different projects from a project tab (and inside a specific project)

Thanks in advance

Orders as in “sequential order” or orders as in requests/cart items?

Orders as in request /cart items.

Each cart being unique to a particular project and user can always return to project and edit or delete cart items as need be when project is still work in progress.

I had envisioned a work flow in which user opens a project and from within that particular project he can then add items (like shopping for project components and qty) using this trebuchet method


Got it. Ya—should be doable. You’d need to reference the project you’re currently viewing in order to dynamically display the current screen’s project order items.

I reference this method at 07:30 here:

1 Like

Definitely bookmarked for a when we can watch next situation!

Thank you so much, but i cant seem to figure out how


I’ve been trying since you made reference to the video but once I open the collection of items to add to project, the project ID in the url is lost.

I have also tired a sequence of actions in which one of them is copied to clip board and I copy the project ID but how do you then paste into the desired column?

Perhaps my setup is complicated all together? The tibuchet method really got me excited as a great way to save up on rows but harder to execute than I thought (I’m more or less a beginner with lots to learn)

How are you configuring the collection of items? What’s the source? The entire table of items with a filter or as a relation or related items?

I actually tried the whole table as well as a relation

Whats the best method here?

I currently have a relation to the order items in the projects table, then in the projects tab, I view the items as a collection from that relation.

But when I want to add a specific item and its quantity to a list, I’m forced to have data write to the order items without a way of carrying the Project ID. If I use the url method, the url would have changed

This is the best way because then the project ID is a part of the deeplink and can be queryable.

1 Like

@Robert_Petitto
Isn’t a bit risky to base a production app on a column type like ‘multiple files’ which is really designed for something quite different.

If many many rows are condensed in a single cell then Glide could get more restrictive on such a column type as it potentially makes the app developers use a lower tier. What’s your thought on that @NoCodeAndy - would you say it is safe to build an app based on the multiple files column as shown in the (not needed to say) very clever app

It depends what you’re using it for. It isn’t a crazy scalabale solution. It’s always better to add rows and make relations to the rows.

3 Likes

Im using it for:

  1. a project managemnet app in which the project manager want to add a couple of items to his project


I agree with this. Specifically: what’s the app used for?

I might not use the trebuchet method with a business-critical operations system, but I might use it with a smaller utility app or one-off event app.

The decision comes down to a couple things, IMO:

a) What’s the implication if it breaks?
b) How much work will I need to do to revise the app?

2 Likes

@Robert_Petitto hey, thanks for the tutorial, it’s been super helfull - I’ve managed to create an ordering system, but would like to turn it into a marketplace ordering system.

  1. Customer adds items from multiple distributors to cart (done)
  2. Group cart items by distributor (done)
  3. Sends email with filtered order items to each distributor when user submits order (stuck)

From what I can find, the suggestions are to either have a order_group helper table or make a bunch of single value columns and look up the distributor for each item.

Would love some ideas.

Thanks,

Mike

Hi Mike,

Seems like a “Manual Trigger” workflow (now available as a preview feature) would suit your needs. When an order is placed, trigger the workflow.

The workflow (not sure how the JSON is set up, but potentially):

  • Loop through JSON array
1 Like

Thanks for the quick response. I’ll try that - JSON setup is still WIP, but haven’t changed the orderId column other than add in the distributor that’s linked to the product being, so will need to loop through all items by distributor to trigger mails. Trying to avoid creating extra tables for order_groups