2 Replies Latest reply on Jun 2, 2011 9:33 PM by applelakshan1

    Problem , auto filling value based on dropdown list

    applelakshan1

      Title

      Problem , auto filling value based on dropdown list

      Post

      Hi guys, 

      i am creating filemaker solution ,  this has 2 tables, 01. Contacts and other one is Diary, . i want to do some implimentation from my contacts.

      * when i am opening the contact called Mr XXXX, he has Unique id called 1.

      * i want to pick another user from same layout, for this i created another field called last_nameX (contact table)

      * And i pointed this as a drop downlist from my all contact's last name field. 

      * so now i can pick Mr BBBB when i look  at the Mr XXXX's record , 

      * my problem here is picking the contact of Mr BBBB, i want to get Mr BBB's  Uniquie id in to new field called "Last nameXID"

      * all thease fields are in Contact table,

      I have attached the screen shot here

      Thanks in Advance

      filemaker.png

        • 1. Re: Problem , auto filling value based on dropdown list
          philmodjunk

          I am going to tell you the specific answer to your question, then suggest changes to make it work better should you get more than one person with the same last name.

          You need this self join relationship:

          Contacts::DropDownField = Contacts 2::LastName

          Contacts 2 is a new table occurrence of contacts you create with the button that has two green plus signs in Manage | Database | Relationships.

          Now, if you place the lastnameXID field from Contacts 2 on your Contacts layout next to the drop down, it will display the ID number of the person you select in the drop down.

          The problem here is what happens if you have two people with the same last name?

          You can reverse the above set up, by defining your value list as a two column value list with the ID number in column 1 and a full name (or even more info) drawn from a calculation field that combines first and last names in column 2. When you select a person from this value list, the list enters and displays the ID number, so you then use this relationship:

          Contacts::DropDownField = Contacts 2::Contacts ID

          And add the last name field from Contacts 2 to your layout so that it is next to your drop down field.

          There are also scripted techniques that allow you to use an auto-complete enabled drop down list of names to find and enter the correct ID number while correctly handling duplicate name issues that may occur.

          http://www.4shared.com/file/plr_jbkk/EnhancedValueSelection.html