3 Replies Latest reply on Jan 23, 2017 3:33 PM by philmodjunk

    Relationship or Script to find a RELATED SET

    peakest

      I am looking for help finding a related set where a Repair Ticket will have Assemblies and each of those Assemblies will have various Assembly Parts. I would like a related set of the the Repair Ticket's Lines as well as each Line's various Assembly Parts.  This way I can provide an itemized list with subtotals for each different repair even if the same part may be used in different repairs.  Such as the 2" hose clamp can be used for a muffler hose or a radiator hose.

      Auto Repair Relationship Graph.tif

      I have attached AutoRepair.fmp12 which is where I started.  Would I need a join table for the repair ticket line's "Assembly" and the Assembly Part's "Assembly"  to form the related set?  (With this I usually end up with just one of the Assembly Parts)  Would I need to find the repair ticket lines's assemblies and then all the related assembly parts for each of the lines?

        • 1. Re: Relationship or Script to find a RELATED SET
          philmodjunk

          From a layout based on RepairTicket, you can use Go To Related Records to pull up a found set of all related records in AssemblyLine.

           

          You can sort these records to group them by Assembly and put fields from Assembly into a sub summary part to serve as a "sub header" above the listed parts. You can include fields from Assembly part in the body of such a report to provide more info--such as a name or description about each listed part.

           

          Note that this is at least a two step process: GTRR, followed by a sort to group the records.

           

          You will need to test this. I have encountered cases in older versions of FileMaker where you had to do more than one GTRR. In some cases, you had to do a GTRR to an intermediate table and layout based on that table followed by a second GTRR with the "match found set" option enabled before you got the desired found set. Hopefully, this is not necessary in your case and with FileMaker 15, but test to be sure.

          • 2. Re: Relationship or Script to find a RELATED SET
            peakest

            I just posted again with a different approach.  I am so confused and desperate for help on this.

             

            Script for Related Set help please

             

            What I really need is the last table shown (example in Excel) where I have every BUILD DETAIL for every row in the TAKEOFF DATA table.

            • 3. Re: Relationship or Script to find a RELATED SET
              philmodjunk

              Your other approach is confusing.

               

              What I suggested here will work for what you want if what you want matches the design of the sample file that you provided.