2 Replies Latest reply on Nov 19, 2010 12:08 PM by philmodjunk

    How to create a Drop-Down box/list for members first and last names fields

    LarryStokes

      Title

      How to create a Drop-Down box/list for members first and last names fields

      Post

      How to create a Drop-Down box/list for members first and last names fields 

       I'm setting up a membership database. I have a table which has the member members information on it. I have a field for "last name" and "first name". On my database form layout I would like to set up a drop down box/list, or pop up box/list with all the members last names and first names sorted alphabetically that will allow me to select a members name and the master membership goes to the selected members ID and display their data on their portion of the form. I have a "Members Information" table with the "Members ID", "Members Last Name" and "Members First Name".

       I made a regular last name box (not drop-down list) but all it does is display the members last name.  When I go to another members name the name in the box changes. That didn't help at all. What I want to be able to do is select a name from the drop-down box/list, or pop-up box/list and cause the form to switch to that members related data fields in the form. I have to many names to blindly scroll through using the arrowed buttons on top panel of FilMaker Pro 11 when I could just scroll down through the drop-down box/list, or pop-up box/list. 

      Part 2:  Hopefully this one is simple.  When I'm going through the database in the form layout mode I would like to display the members first and last name together on the top left heading of the Members Form and their primary phone number on the left side of the heading (I do have a related contact table with the "Primary Phone" field and the "Member ID" field. Thanks for your help.

       Larry J

       

       

        • 1. Re: How to create a Drop-Down box/list for members first and last names fields
          andrewggrant

          Larry,

          It sounds like your "Part 2" question may be answered using a Merge Field (Insert, Merge Field…) with, "<<FirstName>> <<LastName>" on the upper left of the form layout and, "<<Primary Phone>>" on the upper right.

          As for your first question, I could suggest (I am very new to FMP) adding a global field for NameLookupFirst and NameLookupLast to the customer's table. I would then create another instance of that table related via the new globals and the FirstName and LastName fields.

          By populating all of the customer information on the layout with the related fields, you should only see the information for the one related record via the relationship.

          I assume this would give you a way to have a single record in your layout and lookup / modify any user's information via the two name pulldown menus (globals).

          Just a thought.

          • 2. Re: How to create a Drop-Down box/list for members first and last names fields
            philmodjunk

            To get your names to sort correctly by last name, then by first name, you'll need a calculation field that combines the two names.

            We'll call it cFullName and define it as Last Name & ", " & Full Name.

            Make this the field your value list uses to list member names.

            You can then write a script to find your member's record:

            Make your drop down list field a global text field (this is a field option you can specify in Manage | Database | Fields.)

            in your script:

            Enter Find Mode [] // clear the pause check box
            Set field [Members::cFullName ; Members::YourGlobaldropdownfield ]
            Set Error capture [on]
            Perform Find[]

            Note: depending on how you've designed your layouts, a find may not be the right approach here.