4 Replies Latest reply on Oct 19, 2010 9:50 AM by philmodjunk

    How to have a list of contacts...

    rhille

      Title

      How to have a list of contacts...

      Post

      Hello

      I am working on a project where I need to have on the left side of a layout a list of all my clients and on the right-hand side of the page, the information from that client. For example, if I click on the name of a client from the complete list, I would like Filemaker to retrieve and display the contact information from that client.

      Is that possible within FM Pro?

      Thanks

      Rick

        • 1. Re: How to have a list of contacts...
          philmodjunk

          Yes, that is possible.

          Let's say your table is called Clients and you have a field ClientID that uniquely identifies each record in that table.

          In Manage | Database | Relationships, select Clients and use the button with two green plus signs to make a second table occurrence "box" that refers to clients. You can rename this new occurrence, AllClients.

          Drag from any field in Clients to any field in AllClients to create a relationship.

          Double click the relationship line and change the relationship operator from = to x.

          Place a portal to AllClients on your Clients layout.

          Put the fields you need from AllClients in the row of this portal to properly list all your clients.

          You can either select these fields and use Button setup... to peform the following script, or you can add a button to the portal row for this purpose:

          Set Variable [$ClientID ; AllClients::ClientID ]
          Enter Find Mode []
          Set Field [Clients::ClientID ; $ClientID ]
          Perform Find[]

          You can even use conditional formatting with this expression: Clients::ClientID = AllClients::ClientID to specify a Fill color for the portal fields to "highlight" the row in the portal that corresponds with the current record visible in the Clients layout.

          • 2. Re: How to have a list of contacts...
            rhille

            Hello Phil

            Thank you for your answer. The steps you gave me worked perfectly. Ye!

            Thanks again

            Rick

            • 3. Re: How to have a list of contacts...
              rhille

              Hello again

              A follow-up: when I show the layout, it shows me some record already in the fields. Is there a way to have an empty layout?

              Thanks again

              Rick

              • 4. Re: How to have a list of contacts...
                philmodjunk

                I think this should work. Use a a script to set up a found set of zero records. Run this script when you first select this layout:

                Show All Records
                Show Omitted Only