Hi. Long time listener, first time caller...
I'm working on an art inventory database requiring nested categories.
I have a categories table set up like this, using a self-join to assign parent categories:
id
parent_id
title
etc...
This allows me to set up nested categories to any level, and I've set up a calculation field to show me the entire hierarchy for any given category, like this: cat1::cat2::cat3...
I've also set up a join table to add multiple categories to inventory records, and a portal to select from a value list of all category values.
So far so good... But I only want my users to be able to select categories with no children. In other words, only the most specific categories get attached to inventory records, as the parent categories are therefore implicit. Without validating this selection, the data can get pretty weird...
I have a calculation field in my categories table using an IsValid () function to check if a child-parent relationship exists, but this same relationship fails to generate the desired value list.
Is there another approach to this?
Thanks!