I’m hoping someone can help me with Nesting a “Reorder List” within a “Reorder List”. I’m fairly new to WeWeb and haven’t been able to find what I need on this particular matter and hope this will also help the community at large. Please see the attached image for reference.
The issue I’m having is when adding a “Category” it duplicates the “Items” from the first category to all categories. So, when adding a new item to the first category it also adds the item to all categories.
Would anyone know how to setup the bindings and workflows that would make all categories and items independent to each category? Any help is greatly appreciated. Thank you!
Thanks for the reply, Agustin. I might need to elaborate. I created the Nested Reorder List in Weweb as seen in the image.
The issues I am running into is adding a new Category and a new Item. When creating a new category, it adds the items from the previous category. I’m trying to figure out how to create a new category with its own items. This seems to be the only part that stumps me.
My intention is to use the Reorder List for Categories and a Nested Reorder List for Items. The categories and items will be stored in an array before being passed to the database. The items will be multiple inputs.
I’m not pulling the List from my DB. Categories and items are in separate tables, etc. Basically, I’m building the lists before they are available in the DB, then submitting them to the DB after they are built.
I’m creating a long form, storing the info in an array, then submitting that info to the DB and various tables.
Hi, in cases like this, the issue most likely is in how you handle your underlying data. This means the data that is bound to the various reorder lists - if something is bound incorrectly, it results in these types of bugs.
Thanks for the reply @Broberto. I completely understand. I’m looking for what someone else would do to accomplish the functionality. I apologize if I’m not illustrating what I need help with.
Is anyone able to share how they would take WeWeb’s Reorder List, nested with another WeWeb Reorder List, and explain how they would create a New Line Item in any Category without it duplicating Line Items in other Categories?
This is a screenshot of what I created in WeWeb (attached screenshot). It doesn’t have to look like this; I just need help with the functionality. I hope the above explanation helps. Any and all help is greatly appreciated.
You need a set of data called category and a set of data called items. All items should have category that relates to a category. So when you have your first list category and second list items you should be able to say we only want to get items where category = parent.item.category.id or such.
Depending on how you’re storing and retrieving your data you could just join items to category in a collection as well.
The essential of this is that each line item has a reference to a category.