1 Reply Latest reply on Dec 5, 2012 3:53 PM by philmodjunk

    Combo Box functionality confusion

    snimmo

      Title

      Combo Box functionality confusion

      Post

           I am new to Filemaker Pro 12 and have tried to find the answer to a simple problem without success.

           Hopefully someone will have a quick response on this as I'm sure there is a solution.

           I have an entry layout that I want to use a dropdown list to display the name of an organization.

           I have a field in my table that links to the organization table's id field (numeric).

           I would like the dropdown list to display the name field from the organization table but store the id from the organization table in my current table's "organization id" field.

           I know this all relys on having a relationship established, a value list created and a dropdown list present on the layout.

           My confusion on this is the following;

           Can I have the relationship be the "organization id" from my current table to the "id" of the organization table, the dropdown list display only the second field (organization name) but store the first (organization id)?

           I have tried numerous combinations of relationships, dropdown list, and value lists to make this work and have read lots of documentation about each but am still have trouble getting the right combination for what I need.

           The closest I've come is getting the organization name to show up in my drop down list, selecting that, but when I tab to the next field it no longer displays the organization name but rather the organization id.

           How do I keep the organization name showing in my dropdown window after picking the appropriate organization name and still have the organization id stored in my table?

           Thanks to anyone who can clear this up for me. 

        • 1. Re: Combo Box functionality confusion
          philmodjunk
               

                    Can I have the relationship be the "organization id" from my current table to the "id" of the organization table, the dropdown list display only the second field (organization name) but store the first (organization id)?

               Yes this can be done.

               

                    The closest I've come is getting the organization name to show up in my drop down list, selecting that, but when I tab to the next field it no longer displays the organization name but rather the organization id.

               You are very close if you can get to this point. There are two options you can use:

               1) switch from drop down list to pop up menu. If you hide the primary field (ID) and just show the secondary field (name), in a pop up menu, the name will still be displayed when you exit the pop up menu field.

               2) Place the organization name field from your related table of organizations on top of your drop down list formatted field. Give it an opaque fill color and use behavior settings in the inspector to deny access to this name field when in browse mode. Now, the name field hides your drop down list field, but when you click on it, the drop down list pops to the front and deploys the list of organizations. After you have made a selection from the list and exit it, it disappears back behind the name field--which now displays the name of the organization you have selected.

               There is also a script supported method that uses a secondary relationship to work off of a text field that auto-completes the name and the script can handle cases where you might have two records with identical names, but it still establishes and ID number based link to the related table. This is more work to set up, but is a better option to use when your list of names becomes too long for the simple value list approach to be practical:

               FileMaker 12 users: https://dl.dropbox.com/u/78737945/SimpleNameLookupDemo.fmp12
               Pre FileMaker 12 Users: https://dl.dropbox.com/u/78737945/SimpleNameLookupDemo.fp7