2 Replies Latest reply on Jan 5, 2017 8:09 AM by erolst

    Entering data from drop down menus

    hannah_carroll

      I'm new to FileMaker and trying to develop a database to store employee information. I have created a layout "directory" which contains fields from multiple tables. The "people" table includes a "Name" field and a "people ID" primary key. There is a "directory" entry for each name. The other tables include "time type," "title type," "appointment type," "title," and "rank." These tables all have limited values. For example, there are only two entries in "time type"- part-time or full-time. Each table is related to the people table and the people table has foreign keys for each primary key field. Question: is it OK to use text values as primary keys? i.e: if my "time type" table only has a "time type" field, can that be used as the primary key, or should I add a primary key field and use a number?

       

      What I want to do:

      I want the directory layout to contain drop down list fields for each table, so that when I create an entry for a new employee, I can select options from each table to fill out their profile. This would populate the "people" table with a full profile of the person's information. I do NOT want the user to be able to add a new value to any other table through the directory layout.

       

      My problem:

      When I select a value from a drop down list and wish to change it, the entry keeps reverting to the original value. I don't know how to allow changes to data through the drop down menus. When I select a value for multiple "directory" entries, it creates multiple entries in the specified table. For example, when I select "part-time" for 3 "directory" entries, my "time type" table suddenly has new entries. I don't want to create entries in that table, but when I unselect "allow creation of entries through this relationship," I can no longer access the values list from the drop down.

       

      I know this post is rather wordy and possibly confusing, but if anyone has any input or possible solutions, it would be greatly appreciated!

       

      Many thanks!

        • 1. Re: Entering data from drop down menus
          philmodjunk

          It appears that the main issue, the last one that you describe is caused by setting up the wrong field with your value list. It would appear that you have set up a field from your time type table with the value list instead of a field from your main table. Thus, your value list selections are creating records in the related table instead of picking a value for the current record in your main table.

           

          is it OK to use text values as primary keys? i.e: if my "time type" table only has a "time type" field, can that be used as the primary key, or should I add a primary key field and use a number?

          developers will argue both ways on that one. In text book terms, your table does not even have a "proper" primary key as the ideal primary key is just a unique identifier code--either a serial number or a UUID string and does not include info meaningful to the humans using the solution. Doing so, set's up problems when the users decide that the "encoded info" in the key needs to be changed.

           

          In practical terms. If there is only the one field in this table and you don't have additional fields of info about each "type", then there is no need to even have a relationship between this table and your main table as the value list does not require such a relationship in order to function. You only need the relationship if you need to look up (copy) or link to additional data in that table and this is not the case if you have only the type text as the sole field in the table.

          • 2. Re: Entering data from drop down menus
            erolst

            hannah_carroll wrote:

             

            I know this post is rather wordy and possibly confusing

            At any rate it is structured and nicely formatted, which is more than you can say about many others