0 Replies Latest reply on Jan 14, 2017 7:57 AM by peakest

    Script help multiple criteria find

    peakest

      Looking to get data from one table linked to related detail data on another table.  Not sure if this is a found set and import into a new table but your help is certainly appreciated.

       

      I have a TAKEOFF with TAKEOFF DATA.  QUANTITY of IDf_Build. Each ID_TakeoffData has LOCATION data that will organize the final report so I need each of ID_TakeoffData with the IDf_Build QUANTITIES individually.

      TakeoffData.png

      I also have varying BUILD DETAILS that are an attributes of the above IDf_Build.  These details contains BUILD PARTS with BUILD PART RATES that will be calculated with the TAKEOFF DATA QUANTITY

      BuildDetail.png

       

      So is this a "FIND" script?

      Here is what I need:

           1- All ID_TakeoffData from an ID_Takeoff, say TakeoffData::IDf_Takeoff: [==1] (that's the easy part...)

           2- Then I need to find the ID_BuildDetail(s) where the BuildDetail::ID_Build matches the TakoffData::ID_Build from step one.

           These records will reside in a new table called TakeoffBuildDetailExtended

           3- In the new table I would like in each row: ID_TakeoffBuildDetailExtended, TakeoffData::IDf_TakeoffData, TakeoffData::IDf_Takeoff, TakeoffData::Location, MATCH OF IDf_Build from TakeoffData and BuildDetail, BuildDetail::IDf_BuildDetail, QUANTITY from TAKEOFFDATA, RATE from BUILD DETAIL, BuildDetail::IDf_BuildPart, and a Calculation Field called ExtendedDetailQuantity: TakeoffData::Quantity * BuildDetail::BuildDetailRate. 

       

      I have posted before, but with your help I think this is the closest I have come to accomplishing this.  Another user suggested an import of related data to the Extended Table with a find and replace for the attributes, but I still do not know how to accomplish this.  I am not a database expert by any means, and this forums help on this would mean the world to me. 

       

      Below is an attempt but something is being lost in translation.  Field 12 is the calculation.

       

      ExtendedBuildDetailsVIAFind.png