Manage the asset tree structure

Tags

It is useful to define a resource tree in order to navigate more easily among these multiple resources on the mobile application or platform.

1. What is a parent resource?

To define a resource tree, one or more parent resources must be defined.

A parent resource can have several child resources (this is even the intended purpose).

However, a child resource can only have one parent resource.

image

In the diagram, we see that the engine is both a parent resource and a child resource.

The car is only a parent resource (of two resources: engine and wheels).

The valve is only a child resource of the engine.

2. In practice, how to create a child database?

Setting the context: Imagine a company that inspects a building. The building is made up of floors. Each floor is made up of rooms. We will define 3 levels of hierarchy.

image
  1. In the Databases tab, click on a database then on Create a resource. Define a name. Here we will name it Building 7. This resource does not have a parent (because it is at the top of the tree).
  2. Then create a new resource that you will name Floor 1. This resource will have Building 7 as its parent resource.
image
  1. Next, create a new resource that you will name Floor 2. This resource will have Building 7 as its parent resource.
  2. Then create a new piece of equipment that you will name Room 101. This resource will have Floor 1 as its parent resource.
  3. Next, create a new piece of equipment that you will name Room 201. This resource will have Floor 2 as its parent resource.
  4. On the platform or mobile app, you can navigate through the different levels of the tree.
image

3. Access the name and attributes of the parent resource:

You can now display the values and/or modify the attributes of a parent resource, directly from your intervention.

image

Imagine, you have different engines. Each engine is a resource, which has a factory as a parent resource. We are going to see how to display this factory, within your application, depending on the chosen engine.

Drag and drop a Text brick. Choose the "Parent Resource" type then the "Name of the resource" attribute.

image

Here, the name of the resource is chosen. Of course, you can choose the attributes of the parent resource.

On the application, the data from the parent resource can thus be collected.

image
💡
Notes
  • Defining a resource tree does not allow manipulation of attributes in any way. Passing attributes is done using the concepts of databases / sub-databases.
  • When creating a new tree, it is useful to start at the top level of the tree. Indeed, when choosing a parent resource, it must have been created beforehand.

4. Bulk modify the parent resource of several resources at once:

Click on the resources for which you want to modify the parent resource, then click on attribute and choose parent. Finally, select the new parent resource.

image