Create group by related list for current record.

brown9394
Tera Expert

Hello Experts, 

I need to create a group by related list based on a field on the record. The idea is to show ALL records for a customer so they can be viewed together. Is it possible to match on customer_name field and show all records for that customer? 

Here's what I'm thinking, For example: 

If Customer A has 5 records, when you open one of those records, show all records combined together in a related list, so we can quickly compare few fields from all existing records. 

If you have a better suggestion, I'm open to that as well. 

Thanks in advanced! 

7 REPLIES 7

vinothkumar
Tera Guru

This is not possible. Related lists show records that are related to the current record you are viewing, but if it's on a new form, there is no record in existence yet to related other records to.

Related lists only show up once the record has been inserted into the database. Reason behind this is because you cannot relate anything to a record until it is created. Out if the box there is a UI macro on the caller field that shows the same list. I would recommend using that.

 

May be you can refer

 

https://docs.servicenow.com/administer/field_administration/task/t_ConfigureRelatedIncidentsIcon.htm...

 

find_real_file.png

ggg
Giga Guru

Table A is the parent.

Table B is the child.

Table B has a ref field pointing to Table A.

Put the Table B related list on Table A.

Open a Table A record.

the Table B records are displayed at the bottom of the screen and you can display any fields you need.

brown9394
Tera Expert

Hi guys, maybe I didn't explain it better. 

I'm looking for a way to group ALL records based on customer field, so if Customer field reads string value of 'Microsoft, Inc', I want all records on the same table to show in one view, ideally how a list view shows when you do a group by. Maybe something along the line an embedded list? I'm not sure what is the best approach here, that's where I'm asking for help on how to go about this. 

so create a filter on your list view

or

do a show matching on your list view