0

I need help with a table relationship.

I'm having trouble figuring out a complicated relationship for linking.  Any help would be appreciated.

I have 

Customers->Locations->Equipment->Tasks->Workorders

I'm trying to find a solution to link equipment and tasks, however not all tasks involve all equipment that a location has. But many tasks involve more than one piece of equipment.  

Any suggestions for the best way to set this up?

1 reply

null
    • James_Sullivan
    • 4 yrs ago
    • Reported - view

    Actually I've kind of solved this with a junction table.  It is very awkward to link data however since its required to navigate through the junction table to link each record.  (Did I do this wrong?)  

    But this has created a different problem where I want to create the same links with a seperate table from the push of a button.  Can anyone provide an example code of how this might be done?

    I'm trying to figure it out in a for loop but am not undertanding the syntax I believe.