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

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @Jyoti Mehta 

 

Did you try the Auto Populate feature in catalog item. This will be helpful. 

 

https://www.servicenow.com/community/developer-articles/auto-populate-a-variable-based-on-a-referenc...

 

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

Hi Atul,

 

Thanks for your reply! I have tried this option also but unfortunately it is not working for us. I have tried to update Site as dependent question in Area field where i tried to auto populate Entity name, but it is not working. 

Sorry mate šŸ˜ž . May be some script need to do.

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

Amit Verma
Kilo Patron
Kilo Patron

Hi @Jyoti Mehta 

 

Can you please let me know if the table "cmdb_ci_ot_isa_entity" is holding  all the information like Site, Areas, Work Center and work unit ? Like if we query "cmdb_ci_ot_isa_entity", can we get all this information with filter on OT asset ?

 

Thanks & Regards

Amit Verma


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