Getting a relational value from a Child Collection

I have a Category Collection that has a Name field and a Sub-Category Collection that has the Category field in it with a link between the two so that I can assign the Category to the Sub-Category. It all works fine.

I also have an Items Collection that has the Sub-Category field in it that links to the Sub-Category Collection.

In my Collection List - which has the Items Collection as it’s source, i have a text field that I’m using to display the Sub-Category. I also have a text field that I want to use to display the Category name based on the link from the Sub-Category in the Items Collections to the Category Collections.

How do I get the Name field from the Category Collection when setting the source for the Category field using Inner Text Settings? All I see in the dropdown is Sub-Category. I don’t see any way to get the Category Name field.

Do you have your readonly project link?

Webflow only supports “one-hop” data-binding through reference fields, so what you’re trying to do is unsupported.

Which approach works best will depend on the details of your data and what you’re trying to build.

But in general you’ll need script and/or duplicate data to build a 3-level hierarchy from the CMS.

I do - but I get this error mesaage when I pasted the link into my Reply

Sorry, we were unable to generate a preview for this web page, because the following oEmbed / OpenGraph tags could not be found: description, image

I’ve only been using Webflow starting today so not sure how to resolve.

That doesn’t affect the link, it just cannot create a preview.
Webflow should fix that actually :slight_smile: just to make to forum prettier.

Ok for a tabular layout you’re wanting to show the category with each item.
The easiest way to do that is just to add a Category ref field to your Items collection.

Duplicate data? yes.
Pretty tidy well-normalized schema? no.
But it requires no code, and is easy to admin.

The link between Sub-Category and Category becomes irrelevant, but it’s useless now anyway.

If you really want that referential integrity, the way to achieve it is to create a second collection list on the page that contains your Sub-Cat to Cat lookup list. You’d hide it, but make it accessible to your scripts. Then scripts would load it, and directly update your main table to add the Category name.

A lot of work for not-much gain, most likely.

thanks for the suggestion of how to do it

Most development tools can do this (show relational data), and have done so for 30 years or longer. And you didnt have to sacrifice referential integrity to do it. For example Bubble can do it.

What i was planning to do was have a treeview (based on the category subcategory child/parent relationship) be used as a way to filter the rows in the collection list.

If you seected a Category, then all the Subs for that Cat get selected. And the rows containing those Subs get displayed. Same if you selected an individual Sub. And displaying the Cat in the row reinforces the selection.

Anyway, thanks for replying and giving me an idea of how to handle. Not perfect, but it would work.

Webflow is a great design tool that’s rather weak on development support. CMS limitations is one area. Collection list limitations, nesting, the lack of CSS vars, server-side code, a well-documented client-side API, the inability to upload .js or .well-known files, etc. are other limitations.

The community is strong though, and you’ll find that some providers like Finsweet have closed a lot of the more relevant gaps in basic site functionality.

When you want more advanced capabilities in the dev and data realms, look at Wized + Xano, which stack on top of your hosted Webflow site and offer a more familiar level of development capability.

thanks - will look into that.

In my Collection List - which has the Items Collection as it’s source, i have a text field that I’m using to display the Sub-Category. I also have a text field that I want to use to display the Category name based on the link from the Sub-Category in the Items Collections to the Category Collections.
pikashow
ppsspp emulator