How to show different list view in embedded list which is used in two different tables?

abhi710
Tera Contributor

I am wondering if it's possible to show a different list view on a embedded list for different table. In my use case, there a relationship(change(applies to table) -> conflict(queries from table)); this embedded list is used in both change and custom table(parent is change table). I have to show specific list view of that embedded list in custom table and default view of embedded list for change table. How to implement it without creating new relationship on (custom table(applies to table) -> conflict(queries from table))?

2 ACCEPTED SOLUTIONS

kaushal_snow
Mega Sage

Hi @abhi710 ,

 

check this - https://www.servicenow.com/community/developer-forum/two-related-lists-on-same-table-but-different-v...

 

If you found my response helpful, please mark it as ‘Accept as Solution’ and ‘Helpful’. This helps other community members find the right answer more easily and supports the community.

 

 

Thanks and Regards,
Kaushal Kumar Jha - ServiceNow Consultant - Lets connect on Linkedin: https://www.linkedin.com/in/kaushalkrjha/

View solution in original post

@abhi710 

I already informed yesterday that it's not feasible.

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

View solution in original post

5 REPLIES 5

eva55
Kilo Contributor

While an embedded list typically inherits a single, default list view, you can use a combination of URL parameters and business rules or client scripts to achieve different views for different parent tables without creating new relationships. The key is to dynamically set the sysparm_view parameter in the embedded list's URL. For the custom table, a business rule or client script can detect the parent table and append &sysparm_view=your_custom_view_name to the embedded list's URL. For the change table, you would leave the URL as is, allowing it to display the default view. This approach allows a single relationship to support multiple views based on the parent table context.

 

abhi710
Tera Contributor

Hi @eva55,
Could you please elaborate more by providing the sample working Client script or BR code to set view on custom table.
Thanks,
Abi

@abhi710 

I already informed yesterday that it's not feasible.

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

Ankur Bawiskar
Tera Patron
Tera Patron

@abhi710 

I don't think you can have different list view for related list for same table.

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader