2 Replies Latest reply on Jan 15, 2012 5:50 PM by LSNOVER

    Two SQL Tables merged onto one layout?

    glynparish

      Hello everyone,

      I have an ODBC SQL Server database that contains 2 tables and I am trying to get both tables to populate one layout instead of having them on their own separate layout.

      I am getting the information from the "Main" table but no information from the "Details" table.

      Can anyone give me instructions on how to get the details table to populate the layout too?

      I have attached a screen shot showing the Layout I want to use in the background window and the 2 table data sources I want to populate the layout with in the forground window.

      Thanks so much!

        • 1. Re: Two SQL Tables merged onto one layout?
          beverly

          You can set up portals with external tables, just like you do with Filemaker native tables. However, because it's SQL, do so carefully (large external datasets do not behave as nicely as FileMaker native datasets). Using External SQL Sources is not meant to have FileMaker as a front end, but it can be used quite well with limited records, fast bandwidth, etc.

           

          Beverly

          • 2. Re: Two SQL Tables merged onto one layout?
            LSNOVER

            I'm not 100% sure what your trying to do.  It looks like the one table should relate to the other.  If that's the case, is it a one to one relationship, or a many to one relationship?  If your not getting any matches on the related data, check your field data and types carefully.  SQL is much more strict then Filemaker.  Relationships are case sensitive.  Be sure you have the same field type for the related field.  Make sure there are no control characters or other hidden characters in the relation data. 

             

            If it's a one to many relation, you will have to use a portal as Beverley alluded to.  Your other option would be to create a view in SQL that joins the tables, and then use the view as a single table in Filemaker.  If you got that route, you won't be able to do data editing on the view directly.  You'll have to build some layouts or relations that get you to the individual tables to do Updates.