How to Autopopulate Area, work center, work unit based on Site field in Operational Technology

Jyoti Mehta
Tera Contributor

Hi All,

we need help for one of the catalog item implementations where we have couple of variables - 1. OT Asset 2. Site 3. Area 4. Work Center 5. Work Unit 

Requirement --> 1. When user selects OT asset then site should be auto populated 

2. when site is auto populated then in Area variable it will show list of Areas 

3. When Area is selected then in Work Center variable it will show list of Work center 

4. When Work Center is selected then in work unit variable it will show list of work unit

 

I have created a new script include and catalog client script to auto populate site value based on OT asset which is working fine but now unable to understand how we can fetch the list of Area, work center, work unit based on Site. 

 

OT asset table is cmdb_ot_entity then i am fecthing the value of isa_entity_site field for Site. 

Site table name - cmdb_ci_ot_isa_entity and Level field is Site 

Hierarchy : Site --> child entities ( Areas ) --> child entities ( work center ) ---> child entities ( work unit )

Area table name - cmdb_ci_ot_isa_entity and Level field is Area

Work center table name - cmdb_ci_ot_isa_entity and Level field is work center 

Work unit table name - cmdb_ci_ot_isa_entity and Level field is work unit

 

If anyone aware how to achieve this then it will be helpful. Please help us as it is critical requirement for us. 

 

Thanks in advance!

7 REPLIES 7

Hi Amit,

 

yes! Site , Area, work center , work unit are having one common field i.e.; Level. If Level - Site in this table then it will show entity name = site name. If Level - Area in cmdb_ci_ot_isa_entity table then it will show entity name = Area name similarly for work center and work unit. 

 

I am bit stuck here, unable to understand how we will do dot walk for child entities. 

Hi @Jyoti Mehta 

 

So we have two tables, first being cmdb_ot_entity which has two columns (OT Asset Name and isa_entity_site). isa_entity_site field is reference field to table cmdb_ci_ot_isa. In the cmdb_ci_ot_isa table, we have two columns ( entity_name and Level). Level field can have values (Site, Area, Work Center and Work Unit) and based on the level field value, entity_name varies.

 

Can you please confirm on this ? Also, how the relationship is being established between these two tables like if I am selecting Site, then inside the cmdb_ci_ot_isa table, how I will get to know what all are the associated Area,Work Center and Work Unit to this site ?

 

Thanks & Regards

Amit Verma


Please mark this response as correct and helpful if it assisted you with your question.

Hi Amit,

 

we have a table cmdb_ot_entity where we have list of all OT assets ( fields name : OT asset name, Site ) here Site field is reference to cmdb_ci_ot_isa_entity table ( In this table we have fields - Entity name, Level, Site, Template, short code etc. ) In cmdb_ci_ot_isa_entity which Equiment Model Entities table we have list of all sites, areas, work center and work unit. 

 

Hierarchy -- Every Site will have Areas then Areas will have work center then work center will have Work unit. 

 

I want to update Area variable value based on Site variable. I am trying to use advanced reference qualifier for us.