Forum Discussion

LouisWambsganss's avatar
LouisWambsganss
Qrew Trainee
5 years ago

Using date ranges across multiple tables

Hello All,

  Long time user/lurker, first time poster here. I have a situation that I have not been able to find an answer for yet, and I was hoping the community could help.

I have an app with two tables.
Table 1 is a list of Discrepancies. Each Discrepancy has fields for Name, Machine Number, and Date. (15,500 discrepancies)
Table 2 is a list of all Parts installed on each Machine over the last 20 years. Each entry has a Part Number, Serial Number, an installation date and (possibly) a removal date on each Machine. (Almost 1 million entries)

Is there a way to take Table 1 data for Machine number and date, and then filter data from Table 2? So all parts installed on that Machine where the Discrepancy date is within the Part installation/removal date range? 

 I have an idea I might just have to convert each of the three date fields (Discrepancy Date, Part Installed Date, and Part Removed Date) into new field where each day has a single sequential number (starting 01JAN2000 was Day #1). 

 Ideally, the user would click on a Discrepancy on Table 1 and would be presented with a list of parts that were installed on that Machine on the date of the discrepancy.

 Please let me know if anyone has any ideas. Otherwise I'm stuck allocating labor hours to just manually searching and filtering to obtain this data, which is not ideal.

Thanks!
Lou

------------------------------
Louis Wambsganss
------------------------------

6 Replies

  • Hi Lou,

    I just have a clarifying questions Lou on the way your app is setup. Is your Discrepancy table and your Parts table related either directly or through another table? If those two tables are related it would be possible to use the relationships to pass down information like the Discrepancy date to use as a filter in a report. Then that report could be used in a report link on your Discrepancy table. Otherwise the data you would need to filter your Parts wouldn't have an easy way to pass down to the Parts table.

    ------------------------------
    Evan Martinez
    Community Marketing Manager
    Quick Base
    ------------------------------
    • LouisWambsganss's avatar
      LouisWambsganss
      Qrew Trainee
      Evan,

        Thanks for the reply. The tables are currently separate. They are populated from separate .csv files. How would I build the necessary table relationships?

      ------------------------------
      Louis Wambsganss
      ------------------------------
      • EvanMartinez's avatar
        EvanMartinez
        Qrew Elite
        Hi Lou,

        If you were creating a relationship would it be the case that one Discrepancy can have many Parts but any one Part would only ever be related to one Discrepancy? Or is it possible that a single part record might tie back to multiple Discrepancies? Also is there any piece of data that appears on both that would be unique? Like an incident number or anything?

        ------------------------------
        Evan Martinez
        Community Marketing Manager
        Quick Base
        ------------------------------