I’m currently working on an app where I have suppliers, and each supplier has multiple items linked to them. Right now, I have one button per item for placing orders, but I’d like to streamline the ordering process by creating a consolidated “order form.”
Essentially, I want to list all the items that a specific supplier provides on a single page. Next to each item, there should be a field to input a quantity. Then, instead of having an order button for each individual item, I’d like to have one single button that, when clicked, creates a complete order for all the items listed, with the quantities specified.
This way, instead of having multiple order entries for each item from the same supplier, there would be one consolidated order entry per supplier.
I’m struggling to figure out how to implement this in Glide. Any guidance, suggestions, or workarounds on how to set this up would be greatly appreciated.
I think the main question here is how you want the data to look like after the “submission”.
Normally, I still keep them separate in 2 tables, one for “Order Items”, which stores individual items and their quantity, and one for “Orders”, basically a consolidated row, with relations and a joined list of items in that order.
If you can live without the “Order Items” table, maybe you can create a flow like this:
Use a method to grab the supplier’s ID to the User Profiles table when you view the supplier’s page.
Add a user-specific column to store the temporary quantity for each supplier’s item.
Create a template like “Item x 5” with Item being the Item name, 5 being the user-specific quantity.
Back to your User Profiles table, create a query using the supplier’s ID to return the supplier’s item rows where the quantity is not empty.
Create a joined list column on top of the query, and submit it to the “order row”.
Find a way to clear the user-specific columns for the next order iteration, if needed.