1 Reply Latest reply on Nov 27, 2011 10:34 AM by bumper

    Displaying a Primary Record



      Displaying a Primary Record


      I have two tables: (1) a "contacts" table and (2) a "phone number" table.

      The "phone number" table has three fields: "phone number", "primary" and a "contact ID" field that links it to the "contact" table. The "primary" field is currently set to display two radio buttons: "primary" and "other".

      The "phone number" records are displayed in a portal on the "contacts" form. One phone number for each contact is designated as the primary number. I would like to show the primary number in a text field on the "contacts" form. This field would be updated any time the user changes the primary number in the "phone number" portal (i.e. adds a new number and assigns as primary).

      Any suggestions would be most appreciated!

        • 1. Re: Displaying a Primary Record

          Assuming you are using FMP 11, when you create the portal, in the dialog box you will see Filter portal and specify, click on specify, select the field to filter by primary , type in = "primary" below (include quotes) and now the only records that show will be those that have primary selected. You can also elect to just show one line the portal in the same dialog box, initial row = 1, show = 1. so you don't need an additional field for display.

          This is but the beginning, you may want to validate so that only one primary is selectable per contact and you may need a scrollable portal to change primary records and add others


          If you don't have 11 you can do the same thing with a global field in your contacts table and a mutli-key relationship.