AndrewFry
7 years agoQrew Assistant Captain
What kind of relationship do I need?
Need some pointers on how to correctly setup my table relationships to be able to do the below.
So I have three tables: Clients, Contacts, Work Orders.
I am having difficulty getting the result I am looking for.
Currently I have the following relationships established, and they are working correctly:
There are 3 different contact types: Site Supervisor, Job Contact, & Home Owner.
A single work order can have up to a max of 3 contacts, from the associated client, thus I was thinking a many contacts for one work order relationship...... but .......
A single contact can be one of the 3 contacts for many work orders, so then it would be many work orders for a single contact ...... right ????????
So then which is it?????
Is it a Many to Many relationship??????
Also, I would like to set up the Work order, so that there are 3 contact fields, one for each contact type, then when I select the Client from the client drop down from within the work order form, it only lists the contacts of that contact type, associated with the selected client.
I now know how to do a conditional drop down for if I select the client name it only gives me contacts associated with that client ... but I need to add one other layer, the contact type.
So, any thoughts/suggestions on:
-Andrew
So I have three tables: Clients, Contacts, Work Orders.
I am having difficulty getting the result I am looking for.
Currently I have the following relationships established, and they are working correctly:
- A Client has many Contacts
- A Client has many Work Orders
There are 3 different contact types: Site Supervisor, Job Contact, & Home Owner.
A single work order can have up to a max of 3 contacts, from the associated client, thus I was thinking a many contacts for one work order relationship...... but .......
A single contact can be one of the 3 contacts for many work orders, so then it would be many work orders for a single contact ...... right ????????
So then which is it?????
Is it a Many to Many relationship??????
Also, I would like to set up the Work order, so that there are 3 contact fields, one for each contact type, then when I select the Client from the client drop down from within the work order form, it only lists the contacts of that contact type, associated with the selected client.
I now know how to do a conditional drop down for if I select the client name it only gives me contacts associated with that client ... but I need to add one other layer, the contact type.
So, any thoughts/suggestions on:
- How to correctly set up the Contacts & Work Orders table relationship?
- Adding an additional layer of condition so that for each contact type drop down within the Work Order form, based upon the client selected, it will onl show me the associated contacts which have that contact type?
-Andrew