Im very new to this so i will try to explain the best i can.
I have a list of products that go into different categories, subcategories and 2nd subcategory (sub-sub category?). My problem is that some items do not have the 2nd subcategory and only belong into subcategory.
Example:
I have these products:
Product1
Product2
Product3
So to find Product 1 and 2 ill have to navigate through 2 folders and for product 3 I will have to navigate through 3 folders. I have already done the folders for SUBCATEGORY 1, 2 in my app by watching the Things in Things video, but I have no idea what to do next.
Thank you for help, I hope my explanation makes sense.
Basically, you create a tree structure with as many levels as you want (you could add CatE, CatF, …), each edge (branch of the tree) is defined in a single row by who the child and who the parent is.
I still dont really get it, I made a new table with the main categories (catA, catC?) and then make
a column in the new table that relates to the parent or the child column? do you have any guide or templates i could look at? I think ill understand once i see an example.
I think Thinh’s recommendation above will work well with a somewhat limited number of subcategories, since each new subcategory requires a new table, and if each table represents different objects with different attributes. For example, Company → Business Units → Departments → Teams → Employees → Projects → Tasks
The attributes of a Company, of a Team, or of an Employee are presumably very different and each object would therefore warrant its own table.
If objects in the hierarchy are the same, or said differently, if the categories are simply a way of categorizing the objects and navigating through a tree hierarchy, then you can set up a tree structure in a single table.
For example, CEO → VPs (CEO’s subordinates) → Directors (subordinates of VPs) → Team leads (subordinate of directors) → Senior managers (subordinates of team leads) → etc. The objects here are the same: an employee, in an Employees table.
Each additional row in the table will add a branch or segment in the tree and it is easy to make the tree as flat or deep or bushy as needed by adding rows.
You will need a parent column, a child column, and a Relation column relating child to parent match multiple.
Optional: Row ID.
In the Layout Editor:
Setup the collection with the table as the data source, display data from the child column, and filter to only display the top nodes (top categories). The top nodes need to be in the child column. The parent of the top nodes can be called root or even left empty. The optional row ID column can come in handy for the filter. Display data from the child column.
Set the collection item click to Show Details Screen.
On the details screen, add a collection. Set the data source to the Parent→Child relation. Display data from the child column.
That’s it. Now you can navigate through your categories and subcategories.
Note about top level categories
There would be different ways to display the initial top nodes (top categories). In the method above I filtered in the layout editor. It would also be possible to create a separate table for them, or to create a Query column and apply the filter in the data editor rather than in the layout editor.
Thank you! I have been playing with it for a little bit and now I understand it. I will try Thinh’s recommendation too when I get the time for it. But now I have a new sheet with a masterlist of all products. How would I put them in the end folder (category where the products belongs in)?
Okay so you are categorizing products. You can use the method I explained above. It’s a little lengthy, but follow the instructions exactly. You could copy column names you see in the screenshots.
In my post above above, I changed the tree diagram for clarity. You now see the numbers to understand what’s going on.
Remember this: all nodes in the tree diagram are a child. The only exception is the root node (0).
So in your case, all categories, subcategories, sub-subcategories and products need to be in the child column. All of them.
Now in the parent column, indicate who the parent is. Only one single node does not have a parent (call that root master or 0 or leave it empty, it doesn’t matter what you call it because it won’t appear anywhere).
On a given row, you will only have one parent and one child. There are no comma-separate lists or arrays.
Then set up your relation. Check the relation is indeed pointing the the correct rows. By looking at your table, you should be able to visualize the tree of main categories, subcategories, sub-subcategories and products.
In my example above, you see the following:
Row 1. Child is 1. The relation points to 3 rows. When I inspect these 3 rows (the bubbles with 3 1’s), I see that the children of node 1 are the nodes 5, 6, 7. This is coherent with the tree diagram.
Row 2. Child is 2. The relation points to 2 rows. When I inspect these 2 rows (the bubbles with 2 2’s), I see that the children of node 2 are the nodes 8 and 9. This is coherent with the tree diagram.
Let’s skip a few rows. Row 5. Child is 5. The parent is 1. The relation points to 1 row. When I inspect this row (the bubbles with a 5), I see that the child of node 5 is node 11. This is coherent with the tree diagram.
And so on.
At the end of the day, the setup is quite straightforward:
Two columns: one child that contains all categories and products, one parent that indicates the parent of each category product
A relation, to create the ability to navigate from row to row.
A filter, either in the data editor or layout editor, to display the top categories only
A collection with the relation as a data source on the details page of the top category
So to find Product 1 and 2 ill have to navigate through 2 folders (CATEGORY > SUBCATEGORY) and for product 3 I will have to navigate through 3 folders (CATEGORY > SUBCATEGORY > SUBSUBCATEGORY)
I hope you understand my explanation
Nathanaels suggestion works well. But I want to try your suggestion too.