2 Replies Latest reply on Nov 8, 2012 6:31 AM by Sorbsbuster

    Display 1 value from a related table in a layout

    brianpatterson

      Title

      Display 1 value from a related table in a layout

      Post

           My database has a table for EVENTS, and a table for VENUES. The primary key in VENUES is a foreign key in EVENTS.

           My client needs to display the Venue Name in the EVENT layout. I can save the event name to the EVENTS table using an auto enter calculation, but I think this value would then be stored in EVENTS, and it should really be looked up when needed to keep the database normalized. How can I do this, and am I correct that I should do it?

           I've been doing this for years in VB with Access table, but don't see how in FileMaker Pro 12

        • 1. Re: Display 1 value from a related table in a layout
          GuyStevens

               This should not be difficult.

               You can just add the field (VenueName) from the Venues table to your layout that's based on the Events table.

               No need to create an extra field in the Events table.

               If your relationship between Events and Venues is done correctly you can display fields from both tables on the same layout.

               Or you could add the Venue name as a merge field on the Events layout.

               Downside about that is that you can't enter data in a merge field in find mode.

                

          • 2. Re: Display 1 value from a related table in a layout
            Sorbsbuster

                 @Brian - note that 'lookup' has a specific meaning in Filemaker.  As you say, you can copy (by a couple of methods; Auto-calc is one, Lookup is another) the venue name to a field in Events.  But it will stay 'frozen' unless you force another update.  That is referred to as 'by look-up', and may well be something you want, such as in an invoice table that populate prices upon record creation, and then freezes it.

                 The method DaSaint suggests is not using a 'lookup', but displaying the live Venue name in the Events Table-based layout, and is almost certainly what you want here.

                 I'm only bothering to be pedantic because 'lookup' is a term used distinctly in FM, and it might cause confusion later.