Edit columns displayed in Relationship editor for a CI

skumar_srbh
Tera Guru

Hi All,

 

This is on relationship editor page, need to add few more columns in the relationship section. However unable to find, from where it is being controlled.  Anyone could please suggest if possible to do and from where...

 

skumar_srbh_0-1685113167307.png

Thanks in advance for the help.

1 ACCEPTED SOLUTION

Hi @midjoule,
yes, mentioned one is not customizable as asked, confirmed by ServiceNow Team.

View solution in original post

4 REPLIES 4

Riya Verma
Kilo Sage
Kilo Sage

Hi @skumar_srbh ,

 

Hope you are doing great.

 

follow these steps to identify the source of control for the relationship section and explore the possibility of adding additional columns:

  1. Navigate to the relationship editor page: Please provide the name or URL of the specific relationship editor page you are referring to. 

  2. Inspect the relationship section: Open the developer tools in your browser (typically done by right-clicking on the page and selecting "Inspect" or "Inspect Element"). This will allow us to inspect the underlying HTML and JavaScript code for the relationship section.

  3. locate the HTML elements that make up the relationship section. Look for attributes such as table name, form name, or related UI components that are associated with the section.

  4. Check if the relationship section is populated through a related list on the form. If so, we need to identify the related list and its associated list control.

  5. Locate the associated list control: In the ServiceNow application, search for the table name identified in step 3. Find the associated list control for the related list and open it for configuration.

  6. Modify the associated list control: Once you have located the associated list control, you can add or remove columns based on your requirements. Look for options such as "Columns" or "Display Columns" in the configuration settings. Add the desired columns to the list of displayed columns and save the changes.

Below is script example to be used for addition of column:

// Locate the associated list control
var associatedList = new GlideListControl('<list_control_sys_id>');

// Add the desired column to the list of displayed columns
associatedList.addColumn("additional_field");
Please mark the appropriate response as correct answer and helpful, This may help other community users to follow correct solution.
Regards,
Riya Verma

I tried to search but couldn't find. Looks like since gear icon itself is not there, we can't personalize(guessing).

midjoule
Kilo Sage

Hi @skumar_srbh ,

You might have noticed the $ in the URL ($relationshipEditor.do). Most of the pages (to not say all) starting with a $ symbol are not customizable.

Best regards

Hi @midjoule,
yes, mentioned one is not customizable as asked, confirmed by ServiceNow Team.