Specify list layout of Related List in Classic UI

jMarshal
Mega Sage
Mega Sage

Hi all - does anyone know how I can customize the default visible/available columns (list layout) of a related list (tabs at bottom of a record) on a custom table in the Classic UI? 

The custom table has user data records and the related list shows catalog items for where the user is "requested for" and I have set up the related list as a Relationship and have results filtered via the "Query with" script.

This is all working great, but I would like to customize the columns of the related list and I'm really struggling to see how/where I do this. I have found great resources and instructions for configuring the list layout for Workspaces and reference field pop-ups...but nothing on related lists specifically. Right now it's showing the Default View list layout and I would prefer to not change the list layout on the entire sc_req_item table.

Right now, my best option is an accompanying KB article that describes to the end user (fulfiller) how to configure/customize the list layout of the related list themselves (via the gear cog icon)...but I would prefer it to have a nice "default" for their purpose as the user data record for this custom app does not concern most of the details of the catalog items which are contained in this list...but some of the information is important and this related list is intended to serve as a "quick visual reference" to that information, for the fulfillers using this app.

I've tried to follow the directions for configuring the layout/view of reference field popups - by way of the "Related Lists" tab on the UI Views record for "sys_ref_list"...but its not very intuitive and I'm fumbling around there with no success - I added "sc_req_item" on that tab (see below)...but the record which I created seems to be a way for me to add a related list to a reference list popup, rather than the layout/view of a related list itself...I feel like I'm "barking up the wrong tree".

jMarshal_0-1700755915491.png


Can someone please point me in the right direction?! Thanks in advance for any/all input!

1 ACCEPTED SOLUTION

Brad Bowman
Kilo Patron
Kilo Patron

To change the columns displayed in the Related List for all users, just right-click the column header and choose Configure > List Layout like any list view.  If you view a list of the table you'll still see the old layout as changing a Related List layout in this way does not affect the table list view.

View solution in original post

9 REPLIES 9

Brad Bowman
Kilo Patron
Kilo Patron

To change the columns displayed in the Related List for all users, just right-click the column header and choose Configure > List Layout like any list view.  If you view a list of the table you'll still see the old layout as changing a Related List layout in this way does not affect the table list view.

oh, man...way easier than I made this out to be! I don't know why I didn't just try this, but I'm sure I'll never forget this again now LOL

jMarshal_0-1700760930871.png

 



Thanks!

You are following a legend here @jMarshal 

*************************************************************************************************************
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 Brad

I have added SLA Breakdown by Assignment as a related list to Incident.  SLA Breakdown by Assignment is in a scope application, incident is in the global scope.  When I opened Configure > List Layout on the related list from the global scope, I am given the option to edit the default view in the application scope or create a new view in the global scope.  Creating a new incident_related_list view in the global scope does not change the related list layout.  Updating the default view in the application scope changes the "standalone" list layout on SLA Breakdown by Assignment but not the related list layout.

 

I tried a view rule on SLA Breadkdown by Assignment with this script:

(function overrideView(view, is_list) {
	if (is_list && RP.isRelatedList() ) {
		answer = 'incident_related_list';
	} else {
		answer = null;		
	}
})(view, is_list);

but that had no effect.

 

I created a custom SLA Breakdown By Assignment relationship for SLA Breakdown By Assignment > Incident using this query, added it as a related list to incident

(function refineQuery(current, parent) {
	current.addQuery('task', parent.getUniqueValue());
	current.addQuery('retroactive', false);
})(current, parent);

and set the relationship field on the incident_related_list record sys_ui_list to reference the SLA Breakdown By Assignment relationship.  The incident_related_list layout was not applied to the related list view.

 

I am out of ideas.  Any suggestions?