3 Replies Latest reply on Apr 12, 2015 3:15 PM by philmodjunk

    Help with Drop-down Selection



      Help with Drop-down Selection


      I am creating a very simple weekly menu program. When the person selects the menu item (Beef Tenderloin for example) I want it to display the corresponding recipe.

      The same menu item may be selected multiple times throughout the week (for example a salad). How can I achieve this? I have each item, description and recipe in separate tables from the weekly menu table.

      All help is appreciated!




        • 1. Re: Help with Drop-down Selection

          The correct approach starts with your data model, the tables and relationships on which you base your database solution. The fields on left named Item1, item2, item3... for example would be better replace by a portal to a related table where each item is a different record.

          I don't know exactly what you are trying to set up, but this looks like a case where each day needs to have a list of items selected and assigned to the different menu options categories shown in your layout (salad, entree, ....)

          So you could set up a Menus table where each record is the menu for one specific day. A related table would be the list of items and their recipes that might be selected for a given menu and a third table would have one record for each item selected for a particular menu record:

          Start with these relationships:


          Menus::__pkMenuID = Menu_Item::_fkMenuID
          Items::__pkItemID = Menu_Item::_fkItemID

          You can place a portal to Menu_Item on the Menus layout to list and select  Items records for each given Menus record. Fields from Items can be included in the Portal to show additional info about each selected Items record and the _fkItemID field can be set up with a value list for selecting Items records by their ID field.

          This is not the full solution for what you have requested, but just a starting point from which to work to produce the final solution.

          • 2. Re: Help with Drop-down Selection

            Ok. that makes sense for one portion, Thanks!!

            The items I am having trouble with are the lunch and dinner. For example: the entree options are in their own table that populate the drop down menu.  In that table it has: ID, Entreefk, Entree name, Entree Descriptions and Recipe (container). What I would like to do is when the drop down selects an entree it pulls over the related recipe (container). I'll then have another layout that is showing the recipes needed for the week.

            I may be building this all backwards but so far everything works but this. thanks in advance for your help and expertise

            • 3. Re: Help with Drop-down Selection

              The recipe and the food item should be one and the same record. Selecting one selects the other. (Note that many recipes consist of three related tables. I am referring to the parent table when I say this.) And this would not use a container field given that you might need to modify a recipe from time to time to keep it up to date to suit preferences, needs, available ingredients, etc...

              The sections of your menu can be filtered portals that filter for particular categories and time of day--fields that you can define in the Menu item table and assign to a specific location on your layout by selecting a specific value in these fields.