Sub Category

How do i create a sub category field?For example, the Sub-Industry field will give the user a list of choices based specifically on what is entered in the Industry field.

If the user chooses “Media” for the Industry, the Sub-Industry field will provide the User with the choices of this list: Cable & Satellite, Entertainment, Publishing, Radio & TV

Thanks in Advance for all help

Subject: Sub Category

Hi,

Make the second field computed by the first

e.g.

formula in ‘Use formula for choices’ for field 1

@DbLookup(“”:“NoCache”;“”:“”;“View”; Key; ColumnNo)

formula in ‘Use formula for choices’ Field 2

@DbLookup(“”:“NoCache”;“”:“”;“View”; Field1; ColumnNo)

Make sure you check the ‘Refresh fields on keywod change’ in Field1 properties & ‘Refresh Choices on document refresh’ is checked in Field2 properties.

HTH

James

Subject: RE: Sub Category

In response to James M Bangs,

do i have to create the additonal form??

Subject: RE: Sub Category

Yes - like Paul said - you’ll have to create a form that has Category / Subcategory on it, and a view to pick the docs from.

You could do it with a big @If(…) statement in the second field, but I’d recommend against it, as you’ll have hard coded your subcategories, and that can be a real pain to maintain.

Good luck

Subject: RE: Sub Category

thank You.

I’ll give it a try. Still a bit confused on directions, but let me try first.

Subject: RE: Sub Category

actually you don’t really have to create a separate form. you could use the main form that has a Category and SubCategory field on it. You can use those 2 fields and create a categorized view to diaplay the values. This assumes that you allow users to enter new Categories and SubCategories on the fly (allow values not in list). But I prefer having a form to hold all keywords and that way I can control what users can enter. This prevents duplicate entries from mispelled or like words and so on.

Subject: Sub Category

Here’s how I do it. Create a Categories Form with a Category and a SubCategory field. Now create documents for each category and assign the sub categories to it. Now create a view to display your Categories docs. Then do an @DbLookup to the view using Category as the Key to locate the sub categories.