Record producer parent child relationship

Thomas99
Tera Contributor

Hi,

 

Can someone please me help with the code. 

I have 4 records producers in the sys_user table. They are all referenced to a custom table u_company_hierarchy

 

1)company

2)department

3) u_division

4)u_unit

 

 

All records in the  u_company_hierarchy table are have a child parent reliationship.

fields in the table are as folllows:  u_name, u_parent, u_type ( types drop down are,  company, dept, division, unit) 

 

 

 

If I select company A, then I should see departments tied to comapany A. When I choose Department, then I should see division tied to department, then I choose divison, I should see units tied to the divsion.

 

This is easily achievable in a catalog form variables, but I want the same set up in a record producer. 

 

2 REPLIES 2

Sandeep Rajput
Tera Patron
Tera Patron

@Thomas99 For this you need to write reference qualifier on your Company, Department, Divisions and Units.

 

Reference qualifier for company

Screenshot 2024-09-05 at 7.55.07 AM.png

Reference qualifier for Department

Screenshot 2024-09-05 at 7.57.40 AM.png

Reference qualifier for Division

Screenshot 2024-09-05 at 7.57.40 AM.png

Reference qualifier for units.

 

Screenshot 2024-09-05 at 7.59.37 AM.png

 

Please refer to https://docs.servicenow.com/bundle/xanadu-platform-administration/page/script/server-scripting/conce... to know more about reference qualifiers.

Hi Sandeep,

 

Thank you for taking the time, howwver department is not fetching any data 

 

 

 

Thomas99_1-1725539236873.png

 

Thomas99_0-1725539212114.png

 

 

The company reference qualifier did work, but department is coming out an empty.