3 Replies Latest reply on Jan 4, 2016 12:15 PM by CarstenLevin

    Autocomplete?

    dtech79

      Hello,

      I have a database with 2 tables.

      One table is an equipment inventory and the second table is an employee table.

      The employee table has a list of all of the employees in the business.

      In the inventory table, among all of the fields, there are three fields that correspond to the employee table:

      AD USERNAME

      FIRST NAME

      LAST NAME.

       

      What I would like to do is have the FIRST NAME  and LAST NAME automatically populate with the correct info once the AD USERNAME is entered.

       

      Is there a way to do so?

      Please help.

       

      Thanks

       

      Dan

        • 1. Re: Autocomplete?
          CarstenLevin

          There are many good ways to do this with FileMaker. But first I would like to understand your purpose.

           

          You have two tables:

          • Employee with one record per person.
          • Equipment Inventory with one record per piece of equipment owned by the company (correct?)

           

          And I assume that when an employee are using a piece of equipment you want to link that to this person (correct?)

           

          If ny assumptions are correct you will want to create a relation between the employee and the equipment.

           

          Add a key to each table, unique serial number.

          Add a foreign key to your equipment table to connect to a person.

           

          Use the relational diagram to connect the two tabels: Create a relation.

           

          Have a look at the example file here.

           

          You can just delete all the zz files if you do not need them.

          • 2. Re: Autocomplete?
            dtech79

            Thank you so much for your reply.

             

            I took a look at your sample DB and we're getting there.

             

            I currently have a DB in MS Access that populates the FNAME and LNAME Fields right after I enter the AD USERNAME.

             

            Here is a sample of my Access DB

            Here, I entered three names into the EMPLOYEES table

            JDOE, YDOE and SDOE.

             

            If you open up the FORMS_INVENTORY and enter a dummy record:

            username: JDOE

            you will see that the FNAME and LNAME will automatically populate once the tab is pressed off the USERNAME field.

             

            That's what I would like to take over to my FM DB.

             

            Thanks.

             

            Dan

            • 3. Re: Autocomplete?
              CarstenLevin

              Hi Dan,

               

              You can use the autocomplete function, using existing values and other tricks, but my point here is that what you want to enter is not the name, but the key to have a relation.

               

              Here we are showing the name, while the real value is the foreign key.

               

              Best regards


              Carsten