4 Replies Latest reply on Apr 17, 2013 6:59 AM by philmodjunk

    Simple Lookup and Auto Fill

    Shields_1

      Title

      Simple Lookup and Auto Fill

      Post

           Newbie here, haven't used Filemaker since before it was ClarisWorks....so I have a rather lot of catching up to do.

           I have 2 tables in my Db ..one called MANUFACTURERS and the other INVENTORY.

      MANUFACTURERS has 2 fields, [manufacturer_name] & [manufacturer id]

      INVENTORY has 3 fields [product_id] , [manufacturer_name] & [manufacturer_id]

            

           In my INVENTORY table I want the [manufacturer_name] field to be a drop down list using values from MANUFACTURERS and when a user selects a manufacturer in that list it will auto fill the [manufacturer_id] field with the [manufacturer_id] information from the MANUFACTURERS table.

           I've created a relationship between the two tables using [manufacturer_id] as the match field, but I can't get the list of manufacturers to appear in the [manufacturer_name] field that I've formatted as a drop down. Nor can I figure out how the data is supposed to auto populate the [manufacturer_id] field. I assume I need to create a lookup of some sort, etc?

           Any help would be much appreciated, I know this is quite basic...but I'm slowly working my way through the help files and this massive 3,000 page book I bought...I'm sort of stuck on this one.

            

        • 1. Re: Simple Lookup and Auto Fill
          philmodjunk

               Take a look at this thread and see if it's enough to get you moving in the right direction:  Auto Fill

          • 2. Re: Simple Lookup and Auto Fill
            Shields_1

                 I read that post several times and unfortunately it uses the phrasing "if you setup" ....well that's the part that kind of glosses over the information I was looking for...it's the "setting up" part I can't seem to get past.

                 I have 2 tables (manufacturer and inventory) with the same field name of manufacturer_id that I've created a relationship for. 

                 I also have 2 fields on each table named manufactuer_name...all I'm trying to do is allow the user to select a drop down in the Inventory table and have it auto fill and copy the related manufacturer_id information from the manufacturer table. I know what I'm trying to do is very simple...it's the physical steps in filemaker that are throwing me.

                 In other words, I was hoping someone might be able to say something like: manufacturer name field type should be X...go into the Inspector and "select display data from X",  Control style should be "drop-down list", with Values from X.....etc..etc.

                  

                 I feel like I have a handle on the logic, I'm missing the funcationality aspect of filemaker that allows me to understand how to setup a field to auto copy, which value lists should be displayed from which table and so forth.

                  

                  

            • 3. Re: Simple Lookup and Auto Fill
              Shields_1

                   Update! Somehow I miraculously managed to get my Manufacturer Name Drop Down to actually display the list of manufacturer's names from the other table...

                   Now my only question is how do I set it up so that the manufacturer_id information from the manufacturer table will copy into the manufacturer_id field in my inventory layout? 

              • 4. Re: Simple Lookup and Auto Fill
                philmodjunk

                     In Manage | Value LIsts...., Create your new value list and select the "use values from a field" option. Select Manufacturer_id--a field that should be of type number and that should be defined to auto-enter a serial number, as the first field and a name field from the same table as your secondary field.

                     When you use this value list in your layout, you'll be able to see and select a manufacturer by name, but the id number is what is entered into the field. There's an option to show or hide the first field's value (the id number) when you display the values of the value list in a drop down list or pop up menu.

                     That's just the "beginner level" approach to this. There are other, more sophisticated options that make working with larger numbers of values in the value list easier.