2 Replies Latest reply on Feb 13, 2012 10:12 AM by daverd

    Newbie question: How do found sets tie to layouts?



      Newbie question: How do found sets tie to layouts?


      I am newbie to FMP but well versed in databases and Access.  I am having difficulty understanding how found sets tie to Layouts.

      For example...In Access, one has a table or tables.  A query is created based on a table, a query, or related tables.  A form can be built on top of a saved query such that the query is a property of the form.

      Can or does FMP have a similar structure?

      In FMP, one has a table or tables.  FMP does not have saved queries but has a Saved Find.  FMP does not forms, it has Layouts.

      However, how do the Saved Finds get associated with a specific Layout?  And is the underlying data source (Saved Find) always tied to the Layout?  If I save the Layout, is the Saved Find saved with the Layout too?

      Appreciate the insight...


        • 1. Re: Newbie question: How do found sets tie to layouts?

          The set up is similar, but permits more "ad hoc" user interaction with the FileMaker's version of a "recordSet".

          In layout setup, you'll find a drop down labeled "show records from". This selects a table occurrence for the layout. A "table occurrence" is what we call a "box" found in Manage | Database | layouts. You can have more than one occurrence for the same table so it's important to select the occurrence that best serves the purpose of your layout. That's because, the occurrence name you select then determines what relationships will control the access to data in related tables.

          You can think of this as serving the purpose of a SQL query of the data if you kept the field list (Select *) and Join portions of the expression, but left out the where and orderby clauses.

          Every table occurrence has a found set, sort order and current record. This provides the same purpose as your recordset in Access, but the user can manipulate the set of records simply by making selections from the Records menu to change the sort order, find records, omit records and such. This is specific to a given FileMaker window, so if you open a new window to the database, you get a whole new set of foundrecords etc for every table occurrence.

          This is a key difference between the two systems and is both a nice feature and potential head ache for developers. It can save you a lot of work because you do not have to design search forms and code to allow the user to interact with the data on their form to pull up different record sets of data, they can just enter find mode and do it themselves. It can be a headache because this gives you less built in control over the recordset unless you build in specific features to limit their ability to do so and the simple "query by example" style of performing finds can make for very complex structure of find requests that require the developer to go ahead and provide a search form and code to make it user friendly any way.

          Here's a tutorial on the subject that you may find useful. Given the techincal background you appear to have, you may even want to click the link in it to access my first, more techincally oriented post on the subject:  Tutorial: What are Table Occurrences?

          • 2. Re: Newbie question: How do found sets tie to layouts?

             Thanks Phil.  You gave me much meat to chew on.

            I've had FMP only a few weeks and rather than blame myself on not picking up on FMP's finer points quicker, I think I'll pick on FMP's UI...I find it lacking a bit in facilitating its functionality easily.

            It's like its functionality expanded faster than the UI matured.

            Regardless, your comments and reference will be very helpful to me.