Why aren't all relationships available for use when building a configuration


 Product(s):APM Implementation and Performance Management
 Version(s):7
 Environment:N/A
 Area:N/A
 Subarea:N/A

Problem Description

User recently asked why the inspection photos column cannot be added to the Inspection view > Indicators Currently in Alarm Configuration.

Solution

Sometimes you can show a certain column in a configuration if you construct it from a certain class but it may not work if you construct it from a different class. 

To better understand why this is the case it is important to consider the most common types of relationships between classes in the APM object model

 There are 3 basic types of relationships in our data model, 

  1. One to one. Example: an Indicator can only be located at one Site.
  2. One to many. Example: a Site can have more than one Indicator.
  3. Many to many. Example: a Standard Task can have many different Indicators and an Indicator can be linked to many different Standard Tasks.

If you anchor the table configuration an object you can display things that are related one to one with that object.

Think of Standard Tasks, Indicators and Assets.

If creating a configuration on a Site you can display the following:

When you anchor the configuration on the Standard Task class

You can show: Standard Task number, Standard task name, Standard task type, Asset number, Asset name, Asset Type name.

You can’t show: Indicator info (Indicator name, Indicator type name)

Why – Standard Task is related one to one with Site, Standard Task is related one to one with Asset but the Standard task is related many to many with Indicators.

When you anchor the table configuration on the Indicator class

You can show: Asset number, Asset name, Asset Type name, Indicator name, Indicator type

You can’t show: Standard task info (Standard Task number, Standard Task name, Standard Task type)

Why – Indicator is related one to one with Site, Indicator is related one to one with Asset but Indicator is related many to many with Standard task

 

If you anchor on Asset class

You can show: Asset number, Asset name, Asset Type name.

You can’t show: standard task info, indicator info

Why – Asset is related one to one with Site, but Asset is related many to many with Standard Task and Asset is related many to many with Indicator.

Note, if you can find a class that has a one to one relationship somewhere in the path between all of the different classes and anchor on it, then you can display information from Asset, Indicator and Standard Task all in the same configuration. For example;

When you anchor on Indicator Reading class

You can show: Indicator name, Indicator type, Asset name, Asset number, Asset Type name, Standard Task name, Standard Task number, Standard Task type… plus Indicator Reading value, Indicator Reading collected on date, etc

Why – Indicator Reading is one to one with Site, Indicator Reading is one to one with Indicator, Indicator Reading is one to one with Asset, Indicator reading is one to one with Standard Task

 

So this is the idea that we can exploit to show inspection photos. When creating a new table configuration if you anchor at Inspection Photo class, you can show the Indicator Reading details and Indicator details whereas we can’t show  the photo details if we anchor at Indicator or Indicator Reading classes. That’s why we can’t simply copy an existing config because they are all anchored at indicator reading.