2 Replies Latest reply on May 30, 2011 7:41 AM by yuichim

    Relationship question in multi file solution

    yuichim

      Title

      Relationship question in multi file solution

      Post

      Hi,

      I have a muli file solution that has one main data file and many applications (user interface) files.
      If possible, I don't want to add any relationships to the data file, however the invoicing solution that I am createing requires a field that needs reltionship.   What it is in Order table, I have a "total" field which gets a sum of all subtotal from OrderItems table.
      But in order to do that I need a relationship.

      Would it be possible to create some kind of solution in applicaiton file so that I don't have to add any relationship in the data file?

        • 1. Re: Relationship question in multi file solution
          LaRetta_1

          "Would it be possible to create some kind of solution in applicaiton file so that I don't have to add any relationship in the data file?

          You can have a summary field in OrderItems which is summary 'total of amount'.  This then can be used in ANY relationship. So now create an external file reference in the UI to this data file.  Create table occurrences on both Order and OrderItems right in your UI, create a relationship between them on InvoiceID - no relationships in the data file required.  Now when you place the OrderItems summary field on the invoice (layout in the UI based on new Orders table occurrence), it will work just fine.

          The only time you need a relationship in the data file is if you need to create a calculation in Invoices.  So calculations such as Sum(), Count() etc would require the relationship be in the data file but not with summaries.  Also keep in mind that, now in vs. 11 with filtered portals, conditional formatting and merge variables, you can many times skip the calculations in the field definitions and instead  create them directly on the layouts based upon the table occurrence group that you create in the UI. 

          So back to your original question ... yes, relationships and TOGs can be in the UI.  In truth, FileMaker should split calculations entirely from the other two layers (of UI and data).  Let's hope it happens in the future.  If they did, they would blow the market wide open because, with FileMaker's rapid development with the power of free calculations and external sources such as SQL, they would become top in their field.

          Update:  Added the words in blue.

          • 2. Re: Relationship question in multi file solution
            yuichim

            Thank you LaRetta,

            I used the summary field and all worked fine :)
            I guess I am thinking a bit too hard and not knowing that filemaker makes things very easy and have many things that you can just apply and do the job.

            Thanks again!