Docs

Inheriting properties

In the previous guides we have discussed how to get started with subject composition as well as how to create a property. In this guide, we want to show you how these concepts can come together. Let’s take a look at the composition we defined in previous How-to guides:

Subject type definition:
graph TD B[
Floor
] --> D[
Room
Parent type: Floor] --> F[
Temperature Sensor
Parent type: Room]
Example:
graph TD B(Floor 1) B --> D[Room 1A] D --> F[Temperature Sensor 1A]
Example:
graph TD B(Floor 2) B --> D[Room 2A] D --> F[Temperature Sensor 2A]

In some cases, it can be beneficial to inherit properties from a parent. In the example above, suppose we want to create a new property, named “Temperature setpoint,” that will be defined on each level of the subject composition, but will be populated solely on the parent. To do this, we must create a new property, assign it to the various subject types, and then populate only the highest level of the composition, in our case Floor. Our objective will be to populate a temperature setpoint of 20 for all subjects with Floor 1 as their parent, and a temperature setpoint of 18 for all subjects with Floor 2 as their parent.

  1. Go to your "Properties" in project "Settings" and create a new property
Properties
  1. Fill in the name and set the data type to "Number"
Select value
  1. Choose "Do not restrict values" and create the property
Create
  1. Go back to "Subjects" overview
Overview
  1. Go to subject "Types"
Types
  1. We will now connect the newly created property to the subject type "Floor"
Select type
  1. Let’s add a property
Type settings
  1. Select "Temperature setpoint" as a property and press "Add property"
Select property
  1. Navigate back to our subject "Types"
Back
  1. Repeat the previous steps and connect the newly created property to the subject type "Room" and "Temperature Sensor"
Select type
  1. Now that the properties are created for "Floor", "Room" and "Temperature Sensor" we can go to our Subjects overview and fill the newly created property for "Floor 1"
Select type
  1. Edit the subject
Edit subject
  1. Populate the property with the value, in this case "20"
Populate
  1. "Temperature Setpoint" is now visible on the dashboard. Let’s go back to "Subjects"
Back
  1. Navigate down the subject composition by using the arrows shown. You might notice that for all underlying subjects, the "Temperature setpoint" has been automatically inherited
Dropdown
  1. Navigate to "Room 1A"
Room 1A
  1. Navigate to "T-001A"
T-001A
  1. Let’s edit our subject
T-001A Edit
  1. Since this temperature sensor is a child of a subject that has populated the Temperature setpoint property, it will inherit the value from the parent by default. If you would like to change this value, you can always enable the Use custom value option.
Edit
  1. Let’s take a look at our subjects overview. We have a nice structured overview of all the parent and child subjects.
Subjects
Congratulations, you have just configured a property to be inherited based on the subject composition. We hope this gives you new ideas and insights about how you can use this powerful feature!
  1. If you don’t see the correct columns, you can edit the column order.
Subjects