Daryl Posted November 29, 2007 Posted November 29, 2007 I have two tables, table A with a one to many relationship to table B. Table B has 3 fields per record that describe the item. One field is "Category", the second field is "SubCategory1" and the third field is "SubCategory2". In a layout for Table A I want to build a series of 3 value lists that drill down to the item in table B and report in a portal. The top level value list would populate with the Category data, the second level value list would then populate with filtered data based on the category data. The third value list would populate with filtered data based on the subcategory1 value and thereby showing me the records in a portal that meet all these criteria. I have tried this many different ways and continue to run into a dead end. I cannot be the only one trying to do this between two simple related tables.
JamesBand Posted November 29, 2007 Posted November 29, 2007 Without knowing the extent to the data and assuming you are limited to 3 category levels... you could just have 3 tables and link them 1 to many -- 1 to many -- 1 to many.... That is the easiest.... If you are looking to dynamically expand the category levels... well you'll have to be a little more elegant.
Daryl Posted November 29, 2007 Author Posted November 29, 2007 Thanks for the reply Jamie. I don't want a third table in this scenario. I just need the value lists to drill the data down. Daryl
JamesBand Posted November 29, 2007 Posted November 29, 2007 your value lists have to come from somewhere... and, I don't know of any other way to make value-lists dynamic.
JamesBand Posted November 29, 2007 Posted November 29, 2007 here is something that basic does what you've requested... but not in the way that you want... have a look at it and see what's going on. categories.zip
Daryl Posted November 30, 2007 Author Posted November 30, 2007 Hello Jamie, That is exactly what I'm looking for. I will have to study how your relationships work as well as how your value lists are set up but the result is what I'm looking for. Thanks so much for the help. Daryl
JamesBand Posted November 30, 2007 Posted November 30, 2007 So... I got to thinking about this thing, this morning. I thought, wouldn't it be cool to be able to use a repeating fields instead? That way you would have far fewer fields to setup... So, I made changes to the example file to include just such a senario. Have a look... Make sure to install ZippScript before you open the DB, if you don't already have it. : categories.zip
JamesBand Posted December 3, 2007 Posted December 3, 2007 There is a problem with the examples as presented... They don't work properly in find mode... Sorry... I am looking into it.
Recommended Posts
This topic is 6201 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now