6 Replies Latest reply on Apr 20, 2011 8:44 AM by AbeHabis

    Drop Down Menu with Different Values

    AbeHabis

      Title

      Drop Down Menu with Different Values

      Post

      I have a layout with one text box for "Category" Then I want to add a drop down menu for "Subcategory" in that same layout beside another text box for "Price". Now what I want is, whenever the user puts in the name of the category, he would be able to choose one subcategory and add the price to it. Then he chooses another subcategory and add the price to it in the same record. For example, The user types the category: Animals Then he chooses from the list of Subcategories: Fish Then he types the price of the fish: $ 10 Then he chooses from the list of subcategories again: Cat Then he types the price of the cat: $ 200 He would then add a new record: Plants . . . .... and so on. Is there anyway I could do that?

        • 1. Re: Drop Down Menu with Different Values
          philmodjunk

          You seem to have two issues here:

          1) You need a conditional value list. Here are three links that can help:

          Forum Tutorial:  Custom Value List?

          2) But you also state:  "Then he chooses another subcategory and add the price to it in the same record."

          While this can be done, you might want to put each combination of category, subcategory and price in different records of the same table in order to make the data easier to work with once you have entered it.

          • 2. Re: Drop Down Menu with Different Values
            AbeHabis

            PhilModJunk,

            Thank you very much for the response and thanks for the links. Unfortunately, I am still stuck. I just created three tables with relations between them (Category, Subcategory, and price) and the layout is using mainly the Category field. I don't want the fields to be filled automatically, I just want the user to choose from the drop down menu and type the price after that in the text box. 

            It is required that it is in the same record, so when someone (after the prices are typed for subcategories) chooses the subcategory from the menu, the price comes up.

            Please help me. I am getting nowhere so far Frown

            P.S. I will be so grateful if there is another demo file for what I need!

            • 3. Re: Drop Down Menu with Different Values
              philmodjunk

              You do not have to do this in the same record. You do not need three tables for the conditional value list, only two.

              Here's a more detailed example:

              Table 1: Products. Define a text field Category. Define another text field: SubCategory. Define a number field, Price.

              Table 2: ProductCategories. Define two text fields: Category and Subcategory

              This relationship:

              Products::Category = ProductCategories::SubCategory

              Define your value list for Categories as the list of values from the Category field in ProductCategories. Format Category on your layout with this value list.

              Define your conditional value list to list the SubCategory values from ProductCategories, "Include only related values starting from Products".

              You can select a category in Category and then the subcategory field in that product record will display only the subcategories you have specified in ProductCategories for that one record. You can create as many different records as you want and select a different category and subcategory for each.

              If you want to select the Category only once and then select a subcategory for a whole series of different products, that can also be done by using a global field for Category in your Products table or by using a parent record with Category in the parent record and your products records can then be listed in a portal. (this requires a change in the relationship since Category would then be defined in a different table, however.)

              • 4. Re: Drop Down Menu with Different Values
                AbeHabis

                Thank you so much for the help, but I am still having a little problem. First, I don't want Category in Products to be a drop down list, but only Subcategory. Second, I could not recognise Category and subcategory in which table you were talking about since they have the same name and you forgot to mention the names of the tables in the quote below:

                "Define your value list for Categories as the list of values from the Category field in ProductCategories. Format Category on your layout with this value list.

                Define your conditional value list to list the SubCategory values from ProductCategories, "Include only related values starting from Products"."  

                - end quote

                Define list for categories in which table? and SubCategory from which table?

                Thanks again for the help. I really appreciate it!

                • 5. Re: Drop Down Menu with Different Values
                  philmodjunk

                  Category should be formatted with some kind of value list to avoid data entry errors, but this is not a requirement in order for the method to work. A Drop down list is just a simple option that you can use with auto-complete to make it easier.

                  You need Category and SubCategory fields in both tables.

                  Table names are in blue:

                  "Define your value list for Categories as the list of values from the Category field in ProductCategories. Format Category on your layout with this value list.

                  Define your conditional value list to list the SubCategory values from ProductCategories, "Include only related values starting from Products"."  

                  A value list is not defined in any table. It is defined in Manage | Value Lists.

                  • 6. Re: Drop Down Menu with Different Values
                    AbeHabis

                    I think I got it done. Thank you so much for the clarifications!