dbTalk Databases Forums  

Categories and subcategories

comp.databases.filemaker comp.databases.filemaker


Discuss Categories and subcategories in the comp.databases.filemaker forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Rich Sagall
 
Posts: n/a

Default Categories and subcategories - 10-14-2005 , 04:04 PM






I am using FM Developer 7 with a Mac running 10.4.2.

I have a database and need help with two of the fields: category and
subcategory. Category has 5 options that appear as a popup list. Each
category has 5 subscategories. Each categories' subcatergories lists are
different.

What I want to do is pick a category and have the appropriate
subcategory popup list appear.

Is there any way to do this?

Thanks,

Rich

Reply With Quote
  #2  
Old   
Michael Paine
 
Posts: n/a

Default Re: Categories and subcategories - 10-14-2005 , 04:20 PM






FM8 allows you to create Value Lists that only list "related" records.
This sounds like your requirement. You need to set up the relationship
graph correctly for this to work.
I have never used FM7 so cannot help you there.
Michael Paine

Rich Sagall wrote:

Quote:
I am using FM Developer 7 with a Mac running 10.4.2.

I have a database and need help with two of the fields: category and
subcategory. Category has 5 options that appear as a popup list. Each
category has 5 subscategories. Each categories' subcatergories lists are
different.

What I want to do is pick a category and have the appropriate
subcategory popup list appear.

Is there any way to do this?

Thanks,

Rich

Reply With Quote
  #3  
Old   
Helpful Harry
 
Posts: n/a

Default Re: Categories and subcategories - 10-14-2005 , 04:59 PM



In article <1h4flw9.dcg76z6sip46N%rich.sagall (AT) pobox (DOT) com>,
rich.sagall (AT) pobox (DOT) com (Rich Sagall) wrote:

Quote:
I am using FM Developer 7 with a Mac running 10.4.2.

I have a database and need help with two of the fields: category and
subcategory. Category has 5 options that appear as a popup list. Each
category has 5 subscategories. Each categories' subcatergories lists are
different.

What I want to do is pick a category and have the appropriate
subcategory popup list appear.

Is there any way to do this?
The easiest way is to store the Sub-catergories in a separate file /
table. Then use a relationship link based on Category to pick up the
appropriate values from that file / table as the value list.
ie.
Both files / tables have the two fields
Category
Subcategory

Enter a seaprate record in the SubcategoriesFile file / table
for each possible category and sub-category combination

Create a relationship from the main file / table to the
Sub-categories file / table:
Category -> SubcatagoriesFile::Category

Create two Value Lists. One is simply a typed list of the
Categories (this could be done other ways, but this keeps
it simple) while the second Value List that takes its
sub-category values from the related field
Subcategory Values from SubcategoriesFile::Subcategory

Format the fields on the layout to use the appropriate
Value Lists and it should all work fine.

Picking a Category entry then makes a valid relationship
link so that only the appropriate values are displayed in
the Sub-category pop-up list. The only problem is that if
no Category has been entered yet, then the relationship
obviously isn't valid yet and the Sub-Category pop-up
list will only say "no values defined".






Helpful Harry
Hopefully helping harassed humans happily handle handiwork hardships ;o)


Reply With Quote
  #4  
Old   
Matt Wills
 
Posts: n/a

Default Re: Categories and subcategories - 10-14-2005 , 05:03 PM



Rich Sagall wrote on (10/14/2005):

Quote:
I am using FM Developer 7 with a Mac running 10.4.2.

I have a database and need help with two of the fields: category and
subcategory. Category has 5 options that appear as a popup list. Each
category has 5 subscategories. Each categories' subcatergories lists are
different.

What I want to do is pick a category and have the appropriate
subcategory popup list appear.

Is there any way to do this?

Thanks,

Rich
Creat a table that lists each subcategory belonging to a category: just
the two fields, populated accordingly.

Your Category value list can be taken from the contents of that Category
field.

Create a self-join relationship of Category = Category but name it
Subcategory.

Now define your value list Subcategory as the contents of the Subcategory
field, as derived from that Subcategory relationship, showing only the
related records.

Format your layout fields to show the appropriate value list.

Whatever category is selected, the subcategory popup will show only the
values that match the relationship.

Matt

--



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.