I have a situation that is stretching my brain and am stuck how to proceed.
I have it working just fine with my current setup in MySQL and a competing product, but moving over to AIM and getting away from MySQL is proving difficult.
I have the following setup that I want to do in AIM:
I need to keep tabs on several different pieces of oilfield equipment. Each piece of equipment is different and has a table setup for keeping related data - operating limits, serial number, etc.. other technical operating data.
I also have a separate table called 'facility' that contains the name of the equipment, type of equipment, latitude and longitude, and owner. This data is mapped to the related equipment in a one-to-one relationship - each piece of equipment can only belong to one facility.
For each piece of equipment I need to have the ability to store a history of work performed on it. My current setup allows me to create what is called an AFE (authorization for expenditure) to perform work on the equipment. Once that is done, work can be logged in to a daily work log for that AFE.
When I browse to a BO for a specific piece of equipment, I want to be able to see all the related work history for that equipment.
What I am having trouble with is that when I create a BO called ‘Compressor’, for example, which would be one of the pieces of equipment I am keeping tabs on, I am not able to see the related work history because it is not directly related. The work history is attached to the facility BO. How can I get the indirectly related work history to show up on a form with the selected equipment?
The reason why I need to have a facility object is because when I create a new AFE, it must allow me to create one for any piece of equipment. See pics for example of how I have it currently working. I want to do the same in AIM.
What am I doing wrong?
I've attached a snapshot of the relation diagram showing relationship between facility and its related equipment (compressor in this case). Hope this helps to understand what I want to do.
Relation Diagram
Thanks!
Current Setup in other product
Form to add AFE

Form to view equipment

Tab showing related work history

Expanding history to see daily log
