IvanWeiss
5 years agoQrew Captain
Looking Up Data through Complex Relationships
Hi everyone,
I have a project management app that we use to generate client level reports. One of our clients asked for us to include to fields in future submissions, who the general contractor is that we have hired and who the architect is. At first glance it seems like no big deal as the information is in our database. But I am not sure how to get it where it needs to be! I am going to do the best to map out the relationships using < as a "has many" indicator. Here is the table layout:
Project < Project Members > Contacts
Companies < Contacts
Projects < Opportunities < Orders
So here is where the data lies..... On the Companies table there is a "type" field where I have listed if the company is an Architect, General Contractor, Installers, Manufacturer, Etc.
The report my client sees is on the Orders Table
So basically I need to get the name of the company all the way to the orders table ONLY if they are a General Contractor or an Architect and I need a field on the table for each (I guess) so I can add it to a report.
Any ideas? The relationships already exist but I am not sure if I need to dynamically create a new relationship to cut out all of the middle tables otherwise there is just too much distance between them all.....
------------------------------
Ivan Weiss
------------------------------
I have a project management app that we use to generate client level reports. One of our clients asked for us to include to fields in future submissions, who the general contractor is that we have hired and who the architect is. At first glance it seems like no big deal as the information is in our database. But I am not sure how to get it where it needs to be! I am going to do the best to map out the relationships using < as a "has many" indicator. Here is the table layout:
Project < Project Members > Contacts
Companies < Contacts
Projects < Opportunities < Orders
So here is where the data lies..... On the Companies table there is a "type" field where I have listed if the company is an Architect, General Contractor, Installers, Manufacturer, Etc.
The report my client sees is on the Orders Table
So basically I need to get the name of the company all the way to the orders table ONLY if they are a General Contractor or an Architect and I need a field on the table for each (I guess) so I can add it to a report.
Any ideas? The relationships already exist but I am not sure if I need to dynamically create a new relationship to cut out all of the middle tables otherwise there is just too much distance between them all.....
------------------------------
Ivan Weiss
------------------------------